Page MenuHomeFreeBSD

Add phys_avail allocation routines.
ClosedPublic

Authored by jeff on Tue, Aug 13, 5:31 PM.

Details

Summary

This depends on https://reviews.freebsd.org/D21250

To implement a more intelligent early alloc I neded to be able to split phys_avail entries. This really could grow a little more encapsulation so there is less direct list manipulation elsewhere. The primary goal is to enable domain aware early allocation but I also think a little abstraction is nicer.

Some of this code came from Drew at netflix.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

jeff created this revision.Tue, Aug 13, 5:31 PM
jeff retitled this revision from Add phys_avail processing routines. to Add phys_avail allocation routines..Tue, Aug 13, 5:40 PM
jeff edited the summary of this revision. (Show Details)
jeff added reviewers: alc, markj, kib, gallatin.
gallatin accepted this revision.Thu, Aug 15, 12:14 AM
gallatin added inline comments.
sys/vm/vm_phys.c
1635 ↗(On Diff #60747)

Style nit .. I think these locals should be sorted alphabetically

1699 ↗(On Diff #60747)

In the numa case, would it make sense to iterate to another domain rather than panic?

This revision is now accepted and ready to land.Thu, Aug 15, 12:14 AM
kib accepted this revision.Sat, Aug 17, 6:49 PM
kib added inline comments.
sys/vm/vm_phys.c
1604 ↗(On Diff #60747)

phys_avail[i + 1] != 0

1642 ↗(On Diff #60747)

dot at the end of the sentence

1668 ↗(On Diff #60747)

Again, end the sentence with dot.

1672 ↗(On Diff #60747)

!= 0

jeff added inline comments.Sun, Aug 18, 6:40 AM
sys/vm/vm_phys.c
1699 ↗(On Diff #60747)

I think that the startup memory we're allocating should be so small relative to domain memory that if we run into this it indicates another bug.