Skip to content

mm: split PTE/PMD PT table Kconfig cleanups+clarifications

David Hildenbrand linux-arm-kernel linux-fsdevel linux-mm linuxppc-dev lkml xen-devel 1 version Applied

Status from this message: [merged mm-stable] powerpc-8xx-document-and-enforce-that-split-pt-locks-are-not-used.patch removed from -mm tree

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 4 repliesApplied 3/3

Patches in v1 All 3 applied

#Subject and filesSizeRepliesApplied
1/3mm: turn USE_SPLIT_PTE_PTLOCKS / USE_SPLIT_PTE_PTLOCKS into Kconfig optionsarch/arm/mm/fault-armv.c arch/x86/xen/mmu_pv.c include/linux/mm.h +5 more+26 -243 repliesApplied
2/3mm/hugetlb: enforce that PMD PT sharing has split PMD PT locksfs/Kconfig include/linux/hugetlb.h mm/hugetlb.c+10 -71 replyApplied
3/3powerpc/8xx: document and enforce that split PT locks are not usedarch/powerpc/mm/pgtable.c+6 -00 repliesApplied

Reviews trailers per patch

2 of 3 patches have a Reviewed-by or Acked-by.

PatchMike Rapoport (Microsoft)Qi ZhengRussell King (Oracle)
1/3A-b R-b R-b
2/3A-b
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [PATCH v1 0/3] mm: split PTE/PMD PT table Kconfig cleanups+clarifications

This series is a follow up to the fixes:
"[PATCH v1 0/2] mm/hugetlb: fix hugetlb vs. core-mm PT locking"

When working on the fixes, I wondered why 8xx is fine (-> never uses split PT locks) and how PT locking even works properly with PMD page table sharing (-> always requires split PMD PT locks).

Let's improve the split PT lock detection, make hugetlb properly depend on it and make 8xx bail out if it would ever get enabled by accident.

As an alternative to patch #3 we could extend the Kconfig SPLIT_PTE_PTLOCKS option from patch #2 -- but enforcing it closer to the code that actually implements it feels a bit nicer for documentation purposes, and there is no need to actually disable it because it should always be disabled (!SMP).

Did a bunch of cross-compilations to make sure that split PTE/PMD PT locks are still getting used where we would expect them.

[1] https://lkml.kernel.org/r/[email protected]

Cc Andrew Morton <[email protected]>
Cc Oscar Salvador <[email protected]>
Cc Peter Xu <[email protected]>
Cc Muchun Song <[email protected]>
Cc Russell King <[email protected]>
Cc Michael Ellerman <[email protected]>
Cc Nicholas Piggin <[email protected]>
Cc Christophe Leroy <[email protected]>
Cc "Naveen N. Rao" <[email protected]>
Cc Juergen Gross <[email protected]>
Cc Boris Ostrovsky <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc Dave Hansen <[email protected]>
Cc "H. Peter Anvin" <[email protected]>
Cc Alexander Viro <[email protected]>
Cc Christian Brauner <[email protected]>

David Hildenbrand (3):
mm: turn USE_SPLIT_PTE_PTLOCKS / USE_SPLIT_PTE_PTLOCKS into Kconfig
options
mm/hugetlb: enforce that PMD PT sharing has split PMD PT locks powerpc/8xx: document and enforce that split PT locks are not used

 arch/arm/mm/fault-armv.c      |  6 +++---
 arch/powerpc/mm/pgtable.c     |  6 ++++++
 arch/x86/xen/mmu_pv.c         |  7 ++++---
 fs/Kconfig                    |  4 ++++
 include/linux/hugetlb.h       |  5 ++---
 include/linux/mm.h            |  8 ++++----
 include/linux/mm_types.h      |  2 +-
 include/linux/mm_types_task.h |  3 ---
 kernel/fork.c                 |  4 ++--
 mm/Kconfig                    | 18 +++++++++++-------
 mm/hugetlb.c                  |  8 ++++----
 mm/memory.c                   |  2 +-
 12 files changed, 42 insertions(+), 31 deletions(-)
Signature · 1 line
2.45.2