Page MenuHomeFreeBSD

Move to 4 level page tables
ClosedPublic

Authored by andrew on Mar 23 2016, 4:01 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Dec 20, 1:37 PM
Unknown Object (File)
Fri, Dec 20, 1:36 PM
Unknown Object (File)
Fri, Dec 20, 1:26 PM
Unknown Object (File)
Fri, Dec 20, 12:28 PM
Unknown Object (File)
Fri, Dec 20, 12:09 PM
Unknown Object (File)
Fri, Dec 20, 12:06 PM
Unknown Object (File)
Fri, Dec 20, 7:54 AM
Unknown Object (File)
Thu, Dec 12, 3:36 PM
Subscribers

Details

Summary

This adds support for 4 level pagetables. To help this it adds two functions
to find the lowest table level, and lowest block/page level. It is expected
this will be useful later to support superpages.

The kernel address space has been kept identical for now, however I epxect
to move memory around later to support a larger DMAP region.

This patch is mostly extending the existing code to use the extra level.
It's not quire ready to be committed, there are a few bits in locore.S that
still need a cleanup, but the other parts are ready for feedback.

Test Plan

I've run stress2 tests on the ThunderX in the Sentex cluster.
I don't think the issues I'm seeing there are due to the patch.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 3058
Build 3090: arc lint + arc unit

Event Timeline

andrew retitled this revision from to Move to 4 level page tables.
andrew updated this object.
andrew edited the test plan for this revision. (Show Details)
andrew added reviewers: arm64, kib.
andrew added a subscriber: emaste.
sys/arm64/arm64/locore.S
90–94

This comment needs to be fixed

448–473

This was used early on, it's probably unneeded now if we stick with a 48-bit address space.

sys/arm64/arm64/vm_machdep.c
86–87

Should rename, it's not a l1 address anymore.

  • Finish locore.S
  • Rename pcb_l1addr
sys/arm64/arm64/locore.S
619

Is this comment still valid ?

sys/arm64/arm64/pmap.c
921

Assert that the pte type is correct, for non-NULL pte ? Same for two more functions below.

1329

deadc0de/deadbeef is spiffy, but vm_page_alloc() does not look at the value for NULL object. It might be slightly faster to use zero.

1404

Why use literal 9 there ? Isn't it something like L0SHIFT - L1SHIFT ?

andrew added inline comments.
sys/arm64/arm64/pmap.c
921

What do you mean by pte type? pmap_pte will only return an entry that contains a page or block map. Both of these are the final level and will point at the physical address for the given virtual address.

The comment above is now stale & will be updated.

sys/arm64/arm64/pmap.c
921

I mean the value of two lowest bits in the pte. Basically, what you said in the first sentence of your reply, expressed as an assert.

Update based on feedback from @kib

Fix format strings so it builds (still need to test)

I changed link_l1_pagetable when it should have been link_l0_pagetable, fix this
Tested on qemu

kib edited edge metadata.

BTW, I suspect that pv_global_lock is not needed on arm64 at all. On amd64 it is still required because we have to issue IPIs for invalidation and delay them as much as possible. With the synchronous and coherent TLB invalidation I _think_ that the issues which are prevented right now by pv_global_lock on amd64, cannot happen on arm64.

This revision is now accepted and ready to land.Mar 30 2016, 1:21 PM
This revision was automatically updated to reflect the committed changes.