Skip to content

mm: Consolidate lazy MMU mode context

Alexander Gordeev linux-mm linux-s390 linuxppc-dev lkml oe-kbuild oe-kbuild-all sparclinux xen-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6mm: Cleanup apply_to_pte_range() routinemm/memory.c+17 -110 replies
2/6mm: Lock kernel page tables before entering lazy MMU modeinclude/linux/pgtable.h mm/kasan/shadow.c mm/memory.c +1 more+16 -124 replies
3/6mm/debug: Detect wrong arch_enter_lazy_mmu_mode() contextsinclude/linux/pgtable.h+17 -30 replies
4/6sparc/mm: Do not disable preemption in lazy MMU modearch/sparc/include/asm/tlbflush_64.h arch/sparc/mm/tlb.c+9 -51 reply
5/6powerpc/64s: Do not disable preemption in lazy MMU modearch/powerpc/include/asm/book3s/64/tlbflush-hash.h+6 -70 replies
6/6powerpc/64s: Do not re-activate batched TLB flusharch/powerpc/include/asm/thread_info.h arch/powerpc/kernel/process.c+0 -274 replies

Reviews trailers per patch

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

PatchNicholas Piggin
1/6R-b
2/6
3/6R-b
4/6
5/6
6/6

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/6] mm: Consolidate lazy MMU mode context

Hi All,

Consolidate arch_enter|leave|flush_lazy_mmu_mode() context and protect with a lock not only user, but also kernel mappings before entering the lazy MMU mode.

For not fully preemptible (Real-Time) kernels that simplifies semantics - while the mode is active the code should assume it is executing in atomic context. That paves the way for cleanups, such as suggested for sparc and powerpc and hopefully brings a bit more clarity in what labeled in commit 691ee97e1a9d ("mm: fix lazy mmu docs and usage") as "a bit of a mess (to put it politely)".

The fully preemptible (Real-Time) kernels could probably also be brought into the fold, but I am not sure about implications (to say at least).

This series is continuation of [1] and [2], with commit b6ea95a34cbd ("kasan: avoid sleepable page allocation from atomic context") already upstream.

I dared to keep Nicholas Piggin R-b on patch 3, but dropped it from patch 2 due to new bits.

Except the optional sparc (untested) and powerpc (complile-tested) updates this series is a prerequisite for implementation of lazy MMU mode on s390.

1. https://lore.kernel.org/linux-mm/[email protected]/#r
2. https://lore.kernel.org/linux-mm/[email protected]/#r

Thanks!

Alexander Gordeev (6):
mm: Cleanup apply_to_pte_range() routine
mm: Lock kernel page tables before entering lazy MMU mode mm/debug: Detect wrong arch_enter_lazy_mmu_mode() contexts sparc/mm: Do not disable preemption in lazy MMU mode powerpc/64s: Do not disable preemption in lazy MMU mode powerpc/64s: Do not re-activate batched TLB flush

 .../include/asm/book3s/64/tlbflush-hash.h     | 13 ++++----
 arch/powerpc/include/asm/thread_info.h        |  2 --
 arch/powerpc/kernel/process.c                 | 25 --------------
 arch/sparc/include/asm/tlbflush_64.h          |  2 +-
 arch/sparc/mm/tlb.c                           | 12 ++++---
 include/linux/pgtable.h                       | 32 +++++++++++++-----
 mm/kasan/shadow.c                             |  5 ---
 mm/memory.c                                   | 33 ++++++++++++-------
 mm/vmalloc.c                                  |  6 ++++
 9 files changed, 65 insertions(+), 65 deletions(-)
Signature · 1 line
2.48.1