Skip to content

arm64: Use pte manipulation functions for THP

Steve Capper linux-arm-kernel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest0 of 3 patches 0 repliesNew

Patches in v1 No applies recorded yet

None of the 3 patches the cover letter announces are in this archive.

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] arm64: Use pte manipulation functions for THP
Quoted 14 lines · Will Deacon
Quoted 13 lines · Catalin Marinas
Quoted 12 lines · Will Deacon
Quoted 10 lines · Steve Capper
Quoted 7 lines · Steve Capper

This series replaces the Transparent HugePage pmd manipulation functions with calls to the standard pte functions. This allows the THP code to take advantage of the new PTE_WRITE logic, and provides better parity with the HugeTLB code (which already uses the pte functions).

Testing was done on the Fast Model with LTP THP tests, and the 3.14-rc1 kernel was used.

Does this series look reasonable?

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

I was waiting for the corresponding arch/arm/ changes.

The arch/arm/ code doesn't have the PTE_WRITE changes. It's a bit more work here because of the classic MMU (but I hope Steve will get there ;).

Indeed, but I'm wary of divergence in the mm code between the two architectures and I'd much rather we try to keep them in sync, rather than improve/bug fix in one before porting the whole lot over.

I do think we need the same behaviour for 3-level code on ARM and for ARM64.

The PTE_WRITE changes for ARM64 allow one to distinguish between writable clean ptes and read only ptes which fixes a very subtle problem with huge pages (and maybe some other problems). This problem is still present in the ARM 3-level code.

The ARM 2-level code stores a separate linux/hardware pte and it is possible to distinguish between writable clean ptes and read only ptes.

For ARM, I would like to split out some of the pte logic and page permissions from pgtable.h into pgtable-[23]level.h. Then introduce PTE_WRITE for the 3-level code on ARM.

Russell,
I have noticed the following for ARM:
36bb94b ARM: pgtable: provide RDONLY page table bit rather than WRITE bit
Are you happy for me to re-introduce PTE_WRITE for the 3-level code only, and keep L_PTE_RDONLY for the 2-level code?

Thanks,

Signature · 1 line
Steve