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

Details

Provenance
dougmAuthored on Dec 24 2021, 6:59 PM
Reviewer
alc
Differential Revision
D33644: alloc memory from reservation before breaking it
Parents
rG7c0ec6638548: tegra210: Implement new get_gate method for tegra210 clocks.
Branches
Unknown
Tags
Unknown