Lines Matching full:orders
69 * Mask of all large folio orders supported for anonymous THP; all orders up to
76 * Mask of all large folio orders supported for file THP. Folios in a DAX
86 * Mask of all large folio orders supported for THP.
189 static inline int highest_order(unsigned long orders) in highest_order() argument
191 return fls_long(orders) - 1; in highest_order()
194 static inline int next_order(unsigned long *orders, int prev) in next_order() argument
196 *orders &= ~BIT(prev); in next_order()
197 return highest_order(*orders); in next_order()
232 * Filter the bitfield of input orders to the ones suitable for use in the vma.
234 * All orders that pass the checks are returned as a bitfield.
237 unsigned long addr, unsigned long orders) in thp_vma_suitable_orders() argument
242 * Iterate over orders, highest to lowest, removing orders that don't in thp_vma_suitable_orders()
244 * that meets requirements, since all lower orders must also meet in thp_vma_suitable_orders()
248 order = highest_order(orders); in thp_vma_suitable_orders()
250 while (orders) { in thp_vma_suitable_orders()
253 order = next_order(&orders, order); in thp_vma_suitable_orders()
256 return orders; in thp_vma_suitable_orders()
262 unsigned long orders);
265 * thp_vma_allowable_orders - determine hugepage orders that are allowed for vma
269 * @orders: bitfield of all orders to consider
271 * Calculates the intersection of the requested hugepage orders and the allowed
272 * hugepage orders for the provided vma. Permitted orders are encoded as a set
276 * Return: bitfield of orders allowed for hugepage in the vma. 0 if no hugepage
277 * orders are allowed.
283 unsigned long orders) in thp_vma_allowable_orders() argument
285 /* Optimization to check if required orders are enabled early. */ in thp_vma_allowable_orders()
295 orders &= mask; in thp_vma_allowable_orders()
296 if (!orders) in thp_vma_allowable_orders()
300 return __thp_vma_allowable_orders(vma, vm_flags, tva_flags, orders); in thp_vma_allowable_orders()
490 unsigned long addr, unsigned long orders) in thp_vma_suitable_orders() argument
498 unsigned long orders) in thp_vma_allowable_orders() argument
623 static inline int highest_order(unsigned long orders) in highest_order() argument
628 static inline int next_order(unsigned long *orders, int prev) in next_order() argument