HomeFreeBSD

vm: alloc pages from reserv before breaking it

Description

vm: alloc pages from reserv before breaking it

Function vm_reserv_reclaim_contig breaks a reservation with enough
free space to satisfy an allocation request and returns the free space
to the buddy allocator. Change the function to allocate the request
memory from the reservation before breaking it, and return that memory
to the caller. That avoids a second call to the buddy allocator and
guarantees successful allocation after breaking the reservation, where
that success is not currently guaranteed.

Reviewed by: alc, kib (previous version)
Differential Revision: https://reviews.freebsd.org/D33644

(cherry picked from commit 0d5fac287294490ac488d74e598e019334610bdb)

Details

Provenance
dougmAuthored on Dec 24 2021, 6:59 PM
Reviewer
alc
Differential Revision
D33644: alloc memory from reservation before breaking it
Parents
rGb52d35520c51: Fix clerical error in page alloc
Branches
Unknown
Tags
Unknown