public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Borislav Petkov <bp@alien8.de>
Cc: Andy Lutomirski <luto@kernel.org>,
	x86@kernel.org, Andi Kleen <andi@firstfloor.org>,
	linux-kernel@vger.kernel.org, Oleg Nesterov <oleg@redhat.com>,
	stable@vger.kernel.org, Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [PATCH] x86/traps: Don't for in_interrupt() to return true in IST handlers
Date: Tue, 24 May 2016 11:51:24 +0200	[thread overview]
Message-ID: <20160524095124.GR3193@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <20160524093629.GA2388@pd.tnic>


@Andy, its linux-kernel@vger, not lkml@vger :-)

On Tue, May 24, 2016 at 11:36:29AM +0200, Borislav Petkov wrote:
> On Tue, May 24, 2016 at 10:59:45AM +0200, Peter Zijlstra wrote:
> > Which use a sequence of: in_nmi(), in_irq(), in_softirq() to pick 1 out
> > of 4 possible contexts.
> 
> So should we make it cleaner and explicit and define a 5th context of
> priorities higher than NMI?
> 
> There's some room between those two:
> 
>  *             NMI_MASK:        0x00100000
>  * PREEMPT_NEED_RESCHED:        0x80000000
> 

A lot of pain; we'd have to go grow a whole bunch of things to 5.

Also, I don't think 5 is enough to model all the IST nesting. I'm also
not sure we really care too much; IST stuff is relatively rare. It just
means we can loose IST based trace events and the like, because its
treated as recursion.

So I think keeping it at 4 is fine, but we do want to make a semi
concious choice on how we map back to those 4.

       reply	other threads:[~2016-05-24  9:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <ce1cd1d47b486c142d57a9a8189470a1c3809a9c.1464062136.git.luto@kernel.org>
     [not found] ` <20160524085945.GE3192@twins.programming.kicks-ass.net>
     [not found]   ` <20160524093629.GA2388@pd.tnic>
2016-05-24  9:51     ` Peter Zijlstra [this message]
     [not found]   ` <CALCETrUYrh8LweJBsmDtC4p+S_==n4Y4aw=PGWQ43jQ-PyPP7g@mail.gmail.com>
     [not found]     ` <20160524170934.GD15189@worktop.bitpit.net>
2016-05-24 18:54       ` [PATCH] x86/traps: Don't for in_interrupt() to return true in IST handlers Andy Lutomirski

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=20160524095124.GR3193@twins.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=andi@firstfloor.org \
    --cc=bp@alien8.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=oleg@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=stable@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox