Page MenuHomeFreeBSD

Allocate the vm_page_array on domain correct memory.

Authored by jeff on Aug 13 2019, 5:41 PM.
Referenced Files
Unknown Object (File)
Mon, Sep 18, 12:04 PM
Unknown Object (File)
Sun, Sep 10, 1:11 AM
Unknown Object (File)
Wed, Sep 6, 7:56 AM
Unknown Object (File)
Wed, Sep 6, 7:54 AM
Unknown Object (File)
Wed, Sep 6, 7:52 AM
Unknown Object (File)
Fri, Sep 1, 9:04 AM
Unknown Object (File)
Fri, Sep 1, 7:58 AM
Unknown Object (File)
Aug 6 2023, 8:37 AM



This gives us lower latency and lower interconnect bandwidth on many benchmarks that process a lot of pages. We probably should also affinitize the vm threads after this for maximum benefit.

I used a separate pml4 entry because it made life easier for me. There isn't a strong technical reason to do so. Given that the page array is 3% of memory I don't think this is an unreasonable use. There is a small downside that you can't skip allocating pages for the page array since it is not at the very end of memory anymore. This creates a waste of 3% of 3%. or .1% of memory. I find this acceptable.

Diff Detail

Lint Passed
No Test Coverage
Build Status
Buildable 25941
Build 24502: arc lint + arc unit

Event Timeline

jeff added reviewers: alc, kib, markj, gallatin.

I suspect the diff generation missed vm_phys.c.


spaces around '/'


and there


you probably can set pg_nx there.


Put {} around the loop body, it has more than one line.


And there too.


So the page array pml4 entry is just below DMAP, am I right ? And the large map max size is reduced by 512G ?

You should update the map in amd64/include/vmparam.h under the comment 'Virtual addresses of things'.


This is strange, this line should be shown as changed. Do you have some issue with the patch generation ?

jeff edited the summary of this revision. (Show Details)

Address review feedback. Move the page array between the direct map and kva.


After this comment I decided to move it down and make sure it had a guard region on either side.

There was a gap between KPML4BASE and DMPML4I that was just big enough. If direct map must be naturally aligned then when it doubles there will still be space even if kva doubles.

I verified the vmparam.h values with gdb.

This revision is now accepted and ready to land.Aug 18 2019, 6:43 PM