All of lore.kernel.org
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: Andy Lutomirski <luto@kernel.org>
Cc: x86@kernel.org, linux-kernel@vger.kernel.org,
	Peter Zijlstra <peterz@infradead.org>
Subject: Re: [PATCH v2 0/5] x86 switch_mm uninlining and IRQ improvements
Date: Wed, 27 Apr 2016 20:09:24 +0200	[thread overview]
Message-ID: <20160427180924.GC27488@pd.tnic> (raw)
In-Reply-To: <cover.1461688545.git.luto@kernel.org>

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.

      parent reply	other threads:[~2016-04-27 18:09 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-26 16:39 [PATCH v2 0/5] x86 switch_mm uninlining and IRQ improvements Andy Lutomirski
2016-04-26 16:39 ` [PATCH v2 1/5] arm: Include linux/preempt.h from asm/mmu_context.h Andy Lutomirski
2016-04-28 10:29   ` [tip:sched/core] sched/core, ARM: " tip-bot for Andy Lutomirski
2016-04-28 10:41     ` Russell King - ARM Linux
2016-04-28 13:27   ` [PATCH v2 1/5] arm: " Russell King - ARM Linux
2016-04-26 16:39 ` [PATCH v2 2/5] sched: Add switch_mm_irqs_off and use it in the scheduler Andy Lutomirski
2016-04-28 10:46   ` [tip:sched/core] sched/core: Add switch_mm_irqs_off() " tip-bot for Andy Lutomirski
2016-04-26 16:39 ` [PATCH v2 3/5] x86/mm: Build arch/x86/mm/tlb.c even on !SMP Andy Lutomirski
2016-04-28 10:47   ` [tip:sched/core] " tip-bot for Andy Lutomirski
2016-04-26 16:39 ` [PATCH v2 4/5] x86/mm: Uninline switch_mm Andy Lutomirski
2016-04-28 10:47   ` [tip:sched/core] x86/mm, sched/core: Uninline switch_mm() tip-bot for Andy Lutomirski
2016-04-26 16:39 ` [PATCH v2 5/5] x86/mm: Turn off IRQs in switch_mm Andy Lutomirski
2016-04-28 10:48   ` [tip:sched/core] x86/mm, sched/core: Turn off IRQs in switch_mm() tip-bot for Andy Lutomirski
2016-04-27 18:09 ` Borislav Petkov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160427180924.GC27488@pd.tnic \
    --to=bp@alien8.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=peterz@infradead.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.