Lines Matching full:slot
99 * @slot: The slot number of the folio to query
101 * Determine if the first mark is set for the folio in the specified slot in a
104 static inline bool folioq_is_marked(const struct folio_queue *folioq, unsigned int slot) in folioq_is_marked() argument
106 return test_bit(slot, &folioq->marks); in folioq_is_marked()
112 * @slot: The slot number of the folio to modify
114 * Set the first mark for the folio in the specified slot in a folio queue
117 static inline void folioq_mark(struct folio_queue *folioq, unsigned int slot) in folioq_mark() argument
119 set_bit(slot, &folioq->marks); in folioq_mark()
125 * @slot: The slot number of the folio to modify
127 * Clear the first mark for the folio in the specified slot in a folio queue
130 static inline void folioq_unmark(struct folio_queue *folioq, unsigned int slot) in folioq_unmark() argument
132 clear_bit(slot, &folioq->marks); in folioq_unmark()
138 * @slot: The slot number of the folio to query
140 * Determine if the second mark is set for the folio in the specified slot in a
143 static inline bool folioq_is_marked2(const struct folio_queue *folioq, unsigned int slot) in folioq_is_marked2() argument
145 return test_bit(slot, &folioq->marks2); in folioq_is_marked2()
151 * @slot: The slot number of the folio to modify
153 * Set the second mark for the folio in the specified slot in a folio queue
156 static inline void folioq_mark2(struct folio_queue *folioq, unsigned int slot) in folioq_mark2() argument
158 set_bit(slot, &folioq->marks2); in folioq_mark2()
164 * @slot: The slot number of the folio to modify
166 * Clear the second mark for the folio in the specified slot in a folio queue
169 static inline void folioq_unmark2(struct folio_queue *folioq, unsigned int slot) in folioq_unmark2() argument
171 clear_bit(slot, &folioq->marks2); in folioq_unmark2()
177 * @slot: The slot number of the folio to query
179 * Determine if the third mark is set for the folio in the specified slot in a
182 static inline bool folioq_is_marked3(const struct folio_queue *folioq, unsigned int slot) in folioq_is_marked3() argument
184 return test_bit(slot, &folioq->marks3); in folioq_is_marked3()
190 * @slot: The slot number of the folio to modify
192 * Set the third mark for the folio in the specified slot in a folio queue
195 static inline void folioq_mark3(struct folio_queue *folioq, unsigned int slot) in folioq_mark3() argument
197 set_bit(slot, &folioq->marks3); in folioq_mark3()
203 * @slot: The slot number of the folio to modify
205 * Clear the third mark for the folio in the specified slot in a folio queue
208 static inline void folioq_unmark3(struct folio_queue *folioq, unsigned int slot) in folioq_unmark3() argument
210 clear_bit(slot, &folioq->marks3); in folioq_unmark3()
226 * the occupancy count and returning the slot number for the folio just added.
235 unsigned int slot = folioq->vec.nr++; in folioq_append() local
237 folioq->vec.folios[slot] = folio; in folioq_append()
238 folioq->orders[slot] = __folio_order(folio); in folioq_append()
239 return slot; in folioq_append()
248 * the occupancy count and returning the slot number for the folio just added.
257 unsigned int slot = folioq->vec.nr++; in folioq_append_mark() local
259 folioq->vec.folios[slot] = folio; in folioq_append_mark()
260 folioq->orders[slot] = __folio_order(folio); in folioq_append_mark()
261 folioq_mark(folioq, slot); in folioq_append_mark()
262 return slot; in folioq_append_mark()
268 * @slot: The folio slot to access
270 * Retrieve the folio in the specified slot from a folio queue segment. Note
271 * that no bounds check is made and if the slot hasn't been added into yet, the
272 * pointer will be undefined. If the slot has been cleared, NULL will be
275 static inline struct folio *folioq_folio(const struct folio_queue *folioq, unsigned int slot) in folioq_folio() argument
277 return folioq->vec.folios[slot]; in folioq_folio()
283 * @slot: The folio slot to access
285 * Retrieve the order of the folio in the specified slot from a folio queue
286 * segment. Note that no bounds check is made and if the slot hasn't been
289 static inline unsigned int folioq_folio_order(const struct folio_queue *folioq, unsigned int slot) in folioq_folio_order() argument
291 return folioq->orders[slot]; in folioq_folio_order()
297 * @slot: The folio slot to access
299 * Retrieve the size of the folio in the specified slot from a folio queue
300 * segment. Note that no bounds check is made and if the slot hasn't been
303 static inline size_t folioq_folio_size(const struct folio_queue *folioq, unsigned int slot) in folioq_folio_size() argument
305 return PAGE_SIZE << folioq_folio_order(folioq, slot); in folioq_folio_size()
311 * @slot: The folio slot to clear
316 static inline void folioq_clear(struct folio_queue *folioq, unsigned int slot) in folioq_clear() argument
318 folioq->vec.folios[slot] = NULL; in folioq_clear()
319 folioq_unmark(folioq, slot); in folioq_clear()
320 folioq_unmark2(folioq, slot); in folioq_clear()
321 folioq_unmark3(folioq, slot); in folioq_clear()