Skip to content
Commit a5e6c65e authored by Ryan Roberts's avatar Ryan Roberts
Browse files

mm: Introduce try_vma_alloc_zeroed_movable_folio()



Like vma_alloc_zeroed_movable_folio(), except it will opportunistically
attempt to allocate high-order folios, retrying with lower orders all
the way to order-0, until success. The user must check what they got
with folio_order().

This will be used to oportunistically allocate large folios for
anonymous memory with a sensible fallback under pressure.

For attempts to allocate non-0 orders, we set __GFP_NORETRY to prevent
high latency due to reclaim, instead preferring to just try for a lower
order. The same approach is used by the readahead code when allocating
large folios.

Signed-off-by: Ryan Roberts's avatarRyan Roberts <ryan.roberts@arm.com>
parent 4ae48a24
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment