Page MenuHomeFreeBSD

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

Authored by olce on Jan 23 2025, 5:16 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Mar 3, 8:40 AM
Unknown Object (File)
Mon, Mar 3, 7:37 AM
Unknown Object (File)
Sun, Mar 2, 5:05 AM
Unknown Object (File)
Thu, Feb 27, 6:00 AM
Unknown Object (File)
Wed, Feb 26, 2:59 PM
Unknown Object (File)
Feb 6 2025, 6:35 AM
Unknown Object (File)
Feb 2 2025, 2:42 AM
Unknown Object (File)
Feb 1 2025, 2:15 AM
Subscribers

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 62304
Build 59188: arc lint + arc unit