]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
vm_phys: avoid waste in multipage allocation
authorDoug Moore <dougm@FreeBSD.org>
Tue, 26 Apr 2022 07:56:23 +0000 (02:56 -0500)
committerDoug Moore <dougm@FreeBSD.org>
Tue, 26 Apr 2022 07:56:23 +0000 (02:56 -0500)
commitfa8a6585c7522b7de6d29802967bd5eba2f2dcf1
tree4176568c3fe5fc14e22e2f2c57873b323d754b74
parent651a887f4e66b15145508e74db72ebb73c22112b
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
sys/vm/vm_phys.c