Lines Matching full:orders
70 * Mask of all large folio orders supported for anonymous THP; all orders up to
77 * Mask of all large folio orders supported for file THP. Folios in a DAX
87 * Mask of all large folio orders supported for THP.
186 static inline int highest_order(unsigned long orders) in highest_order() argument
188 return fls_long(orders) - 1; in highest_order()
191 static inline int next_order(unsigned long *orders, int prev) in next_order() argument
193 *orders &= ~BIT(prev); in next_order()
194 return highest_order(*orders); in next_order()
229 * Filter the bitfield of input orders to the ones suitable for use in the vma.
231 * All orders that pass the checks are returned as a bitfield.
234 unsigned long addr, unsigned long orders) in thp_vma_suitable_orders() argument
239 * Iterate over orders, highest to lowest, removing orders that don't in thp_vma_suitable_orders()
241 * that meets requirements, since all lower orders must also meet in thp_vma_suitable_orders()
245 order = highest_order(orders); in thp_vma_suitable_orders()
247 while (orders) { in thp_vma_suitable_orders()
250 order = next_order(&orders, order); in thp_vma_suitable_orders()
253 return orders; in thp_vma_suitable_orders()
272 unsigned long orders);
275 * thp_vma_allowable_orders - determine hugepage orders that are allowed for vma
279 * @orders: bitfield of all orders to consider
281 * Calculates the intersection of the requested hugepage orders and the allowed
282 * hugepage orders for the provided vma. Permitted orders are encoded as a set
286 * Return: bitfield of orders allowed for hugepage in the vma. 0 if no hugepage
287 * orders are allowed.
293 unsigned long orders) in thp_vma_allowable_orders() argument
295 /* Optimization to check if required orders are enabled early. */ in thp_vma_allowable_orders()
305 orders &= mask; in thp_vma_allowable_orders()
306 if (!orders) in thp_vma_allowable_orders()
310 return __thp_vma_allowable_orders(vma, vm_flags, tva_flags, orders); in thp_vma_allowable_orders()
500 unsigned long addr, unsigned long orders) in thp_vma_suitable_orders() argument
508 unsigned long orders) in thp_vma_allowable_orders() argument
633 static inline int highest_order(unsigned long orders) in highest_order() argument
638 static inline int next_order(unsigned long *orders, int prev) in next_order() argument