Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1389420
| From | Borislav Petkov <bp@alien8.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 0/5] x86 switch_mm uninlining and IRQ improvements |
| Date | 2016-04-27 20:10 +0200 |
| Message-ID | <rsC4p-5HB-7@gated-at.bofh.it> (permalink) |
| References | <rsebL-2ma-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, Apr 26, 2016 at 09:39:04AM -0700, Andy Lutomirski wrote:
> 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(-)
Reviewed-by: Borislav Petkov <bp@suse.de>
There was a concern that maybe disabling IRQs in
exec_mmap->activate_mm()->switch_mm() would be a little bit of a
slowdown but that's not a hot path anyway.
--
Regards/Gruss,
Boris.
ECO tip #101: Trim your mails when you reply.
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH v2 0/5] x86 switch_mm uninlining and IRQ improvements Andy Lutomirski <luto@kernel.org> - 2016-04-26 18:40 +0200 [PATCH v2 3/5] x86/mm: Build arch/x86/mm/tlb.c even on !SMP Andy Lutomirski <luto@kernel.org> - 2016-04-26 18:40 +0200 [PATCH v2 4/5] x86/mm: Uninline switch_mm Andy Lutomirski <luto@kernel.org> - 2016-04-26 18:40 +0200 [PATCH v2 5/5] x86/mm: Turn off IRQs in switch_mm Andy Lutomirski <luto@kernel.org> - 2016-04-26 18:40 +0200 [PATCH v2 1/5] arm: Include linux/preempt.h from asm/mmu_context.h Andy Lutomirski <luto@kernel.org> - 2016-04-26 18:40 +0200 [PATCH v2 2/5] sched: Add switch_mm_irqs_off and use it in the scheduler Andy Lutomirski <luto@kernel.org> - 2016-04-26 18:50 +0200 Re: [PATCH v2 0/5] x86 switch_mm uninlining and IRQ improvements Borislav Petkov <bp@alien8.de> - 2016-04-27 20:10 +0200
csiph-web