Lines Matching full:slot

105  * @slot: The slot number of the folio to query
107 * Determine if the first mark is set for the folio in the specified slot in a
110 static inline bool folioq_is_marked(const struct folio_queue *folioq, unsigned int slot) in folioq_is_marked() argument
112 return test_bit(slot, &folioq->marks); in folioq_is_marked()
118 * @slot: The slot number of the folio to modify
120 * Set the first mark for the folio in the specified slot in a folio queue
123 static inline void folioq_mark(struct folio_queue *folioq, unsigned int slot) in folioq_mark() argument
125 set_bit(slot, &folioq->marks); in folioq_mark()
131 * @slot: The slot number of the folio to modify
133 * Clear the first mark for the folio in the specified slot in a folio queue
136 static inline void folioq_unmark(struct folio_queue *folioq, unsigned int slot) in folioq_unmark() argument
138 clear_bit(slot, &folioq->marks); in folioq_unmark()
144 * @slot: The slot number of the folio to query
146 * Determine if the second mark is set for the folio in the specified slot in a
149 static inline bool folioq_is_marked2(const struct folio_queue *folioq, unsigned int slot) in folioq_is_marked2() argument
151 return test_bit(slot, &folioq->marks2); in folioq_is_marked2()
157 * @slot: The slot number of the folio to modify
159 * Set the second mark for the folio in the specified slot in a folio queue
162 static inline void folioq_mark2(struct folio_queue *folioq, unsigned int slot) in folioq_mark2() argument
164 set_bit(slot, &folioq->marks2); in folioq_mark2()
170 * @slot: The slot number of the folio to modify
172 * Clear the second mark for the folio in the specified slot in a folio queue
175 static inline void folioq_unmark2(struct folio_queue *folioq, unsigned int slot) in folioq_unmark2() argument
177 clear_bit(slot, &folioq->marks2); in folioq_unmark2()
183 * @slot: The slot number of the folio to query
185 * Determine if the third mark is set for the folio in the specified slot in a
188 static inline bool folioq_is_marked3(const struct folio_queue *folioq, unsigned int slot) in folioq_is_marked3() argument
190 return test_bit(slot, &folioq->marks3); in folioq_is_marked3()
196 * @slot: The slot number of the folio to modify
198 * Set the third mark for the folio in the specified slot in a folio queue
201 static inline void folioq_mark3(struct folio_queue *folioq, unsigned int slot) in folioq_mark3() argument
203 set_bit(slot, &folioq->marks3); in folioq_mark3()
209 * @slot: The slot number of the folio to modify
211 * Clear the third mark for the folio in the specified slot in a folio queue
214 static inline void folioq_unmark3(struct folio_queue *folioq, unsigned int slot) in folioq_unmark3() argument
216 clear_bit(slot, &folioq->marks3); in folioq_unmark3()
232 * the occupancy count and returning the slot number for the folio just added.
241 unsigned int slot = folioq->vec.nr++; in folioq_append() local
243 folioq->vec.folios[slot] = folio; in folioq_append()
244 folioq->orders[slot] = __folio_order(folio); in folioq_append()
245 return slot; in folioq_append()
254 * the occupancy count and returning the slot number for the folio just added.
263 unsigned int slot = folioq->vec.nr++; in folioq_append_mark() local
265 folioq->vec.folios[slot] = folio; in folioq_append_mark()
266 folioq->orders[slot] = __folio_order(folio); in folioq_append_mark()
267 folioq_mark(folioq, slot); in folioq_append_mark()
268 return slot; in folioq_append_mark()
274 * @slot: The folio slot to access
276 * Retrieve the folio in the specified slot from a folio queue segment. Note
277 * that no bounds check is made and if the slot hasn't been added into yet, the
278 * pointer will be undefined. If the slot has been cleared, NULL will be
281 static inline struct folio *folioq_folio(const struct folio_queue *folioq, unsigned int slot) in folioq_folio() argument
283 return folioq->vec.folios[slot]; in folioq_folio()
289 * @slot: The folio slot to access
291 * Retrieve the order of the folio in the specified slot from a folio queue
292 * segment. Note that no bounds check is made and if the slot hasn't been
295 static inline unsigned int folioq_folio_order(const struct folio_queue *folioq, unsigned int slot) in folioq_folio_order() argument
297 return folioq->orders[slot]; in folioq_folio_order()
303 * @slot: The folio slot to access
305 * Retrieve the size of the folio in the specified slot from a folio queue
306 * segment. Note that no bounds check is made and if the slot hasn't been
309 static inline size_t folioq_folio_size(const struct folio_queue *folioq, unsigned int slot) in folioq_folio_size() argument
311 return PAGE_SIZE << folioq_folio_order(folioq, slot); in folioq_folio_size()
317 * @slot: The folio slot to clear
322 static inline void folioq_clear(struct folio_queue *folioq, unsigned int slot) in folioq_clear() argument
324 folioq->vec.folios[slot] = NULL; in folioq_clear()
325 folioq_unmark(folioq, slot); in folioq_clear()
326 folioq_unmark2(folioq, slot); in folioq_clear()
327 folioq_unmark3(folioq, slot); in folioq_clear()