Skip to content

x86 switch_mm uninlining and IRQ improvements

Andy Lutomirski lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest5 patches 3 repliesIn review

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5arm: Include linux/preempt.h from asm/mmu_context.harch/arm/include/asm/mmu_context.h+1 -02 replies
2/5sched: Add switch_mm_irqs_off and use it in the schedulerinclude/linux/mmu_context.h kernel/sched/core.c+10 -30 replies
3/5x86/mm: Build arch/x86/mm/tlb.c even on !SMParch/x86/mm/Makefile arch/x86/mm/tlb.c+5 -20 replies
4/5x86/mm: Uninline switch_mmarch/x86/include/asm/mmu_context.h arch/x86/mm/tlb.c+104 -960 replies
5/5x86/mm: Turn off IRQs in switch_mmarch/x86/include/asm/mmu_context.h arch/x86/mm/tlb.c+13 -00 replies

Reviews trailers per patch

1 of 5 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchBorislav PetkovRussell King
SeriesR-b
1/5A-b
2/5
3/5
4/5
5/5

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

Read the v2 thread

Cover letter [PATCH v2 0/5] x86 switch_mm uninlining and IRQ improvements

Hi all-

I've been playing with context switching lately, and I'm going to start sending out some of the patches that should be mostly self-contained and ready for -tip.

Here's a little batch to start improving switch_mm. It uninlines it and makes it run with IRQs off. (AFAICT everyone who's modified it thought it ran with IRQs off, but that's not always the case. I don't know of any bugs that this fixes, but it'll be needed for PCID to avoid introducing really nasty races.)

This may also help a bit with FSGSBASE -- not sure yet. It certainly won't hurt.

It contains a trivial off-topic ARM patch to avoid breaking the build.

Andy Lutomirski (5):
arm: Include linux/preempt.h from asm/mmu_context.h
sched: Add switch_mm_irqs_off and use it in the scheduler x86/mm: Build arch/x86/mm/tlb.c even on !SMP x86/mm: Uninline switch_mm
x86/mm: Turn off IRQs in switch_mm

 arch/arm/include/asm/mmu_context.h |   1 +
 arch/x86/include/asm/mmu_context.h | 101 ++------------------------------
 arch/x86/mm/Makefile               |   3 +-
 arch/x86/mm/tlb.c                  | 116 +++++++++++++++++++++++++++++++++++++
 include/linux/mmu_context.h        |   7 +++
 kernel/sched/core.c                |   6 +-
 6 files changed, 133 insertions(+), 101 deletions(-)
Signature · 1 line
2.5.5