HomeFreeBSD

vm_phys: avoid waste in multipage allocation

Description

vm_phys: avoid waste in multipage allocation

In vm_phys_alloc_contig, for an allocation bigger than the size of any
buddy queue free block, avoid examining any maximum-size free block
more than twice, by only starting to consider a sequence of adjacent
max-blocks starting at a max-block that does not follow another
max-block. If that first max-block follows adjacent blocks of smaller
size, and if together they provide enough memory to reduce by one the
number of max-blocks required for this allocation, use them as part of
this allocation.

Reviewed by: markj
Tested by: pho
Discussed with: alc
Differential Revision: https://reviews.freebsd.org/D34815

Details

Provenance
dougmAuthored on Apr 26 2022, 7:56 AM
Reviewer
markj
Differential Revision
D34815: For multipage allocation, start block scan at start of free range
Parents
rG651a887f4e66: xen: Use devclass_find to lookup devclasses in identify.
Branches
Unknown
Tags
Unknown