Lines Matching full:orders
73 * Mask of all large folio orders supported for anonymous THP; all orders up to
80 * Mask of all large folio orders supported for file THP. Folios in a DAX
90 * Mask of all large folio orders supported for THP.
193 static inline int highest_order(unsigned long orders) in highest_order() argument
195 return fls_long(orders) - 1; in highest_order()
198 static inline int next_order(unsigned long *orders, int prev) in next_order() argument
200 *orders &= ~BIT(prev); in next_order()
201 return highest_order(*orders); in next_order()
236 * Filter the bitfield of input orders to the ones suitable for use in the vma.
238 * All orders that pass the checks are returned as a bitfield.
241 unsigned long addr, unsigned long orders) in thp_vma_suitable_orders() argument
246 * Iterate over orders, highest to lowest, removing orders that don't in thp_vma_suitable_orders()
248 * that meets requirements, since all lower orders must also meet in thp_vma_suitable_orders()
252 order = highest_order(orders); in thp_vma_suitable_orders()
254 while (orders) { in thp_vma_suitable_orders()
257 order = next_order(&orders, order); in thp_vma_suitable_orders()
260 return orders; in thp_vma_suitable_orders()
266 unsigned long orders);
269 * thp_vma_allowable_orders - determine hugepage orders that are allowed for vma
273 * @orders: bitfield of all orders to consider
275 * Calculates the intersection of the requested hugepage orders and the allowed
276 * hugepage orders for the provided vma. Permitted orders are encoded as a set
280 * Return: bitfield of orders allowed for hugepage in the vma. 0 if no hugepage
281 * orders are allowed.
287 unsigned long orders) in thp_vma_allowable_orders() argument
289 /* Optimization to check if required orders are enabled early. */ in thp_vma_allowable_orders()
299 orders &= mask; in thp_vma_allowable_orders()
300 if (!orders) in thp_vma_allowable_orders()
304 return __thp_vma_allowable_orders(vma, vm_flags, tva_flags, orders); in thp_vma_allowable_orders()
524 unsigned long addr, unsigned long orders) in thp_vma_suitable_orders() argument
532 unsigned long orders) in thp_vma_allowable_orders() argument
663 static inline int highest_order(unsigned long orders) in highest_order() argument
668 static inline int next_order(unsigned long *orders, int prev) in next_order() argument