Page MenuHomeFreeBSD

vm_phys_early_alloc_ex*(): Switch allocation strategy to best fit
Needs ReviewPublic

Authored by olce on Thu, Jan 23, 5:16 PM.

Details

Reviewers
markj
dougm
alc
Summary

Best fit allows to better preserve big chunks, increasing the chance of
being able to fulfill large contiguous allocations even late in the
pre-VM bootstrap steps.

In a context where allocated memory is never deallocated and most
allocations are small with respect to the total physical memory, the
previously used strategy (choosing the biggest chunk / worst fit) looses
its advantages.

In such a context, another marginal advantage of best fit is earlier
depletion of small segments, possibly lowering the total number of
segments to the benefit of routines browsing them (such as
PHYS_TO_VM_PAGE() on VM_PHYSSEG_SPARSE).

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 61935
Build 58819: arc lint + arc unit