[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160929064341.GH3318@worktop.controleur.wifipass.org>
Date: Thu, 29 Sep 2016 08:43:41 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Vineet Gupta <vgupta@...opsys.com>
Cc: Andy Lutomirski <luto@...capital.net>,
Alexey Brodkin <Alexey.Brodkin@...opsys.com>,
arcml <linux-snps-arc@...ts.infradead.org>,
Vineet Gupta <Vineet.Gupta1@...opsys.com>,
lkml <linux-kernel@...r.kernel.org>
Subject: Re: NMI for ARC
On Wed, Sep 28, 2016 at 06:20:29PM -0700, Vineet Gupta wrote:
> On 09/28/2016 03:26 PM, Andy Lutomirski wrote:
> >> Right, so what I think Vineet is asking is if we need to disable NMIs as
> >> > well, we cannot on x86 disable NMIs so no.
> >> >
> > The same argument works here, too: an NMI won't set TIF_NEED_RESCHED
> > without sending an IPI, so we can't miss a wakeup.
>
> But what exact wakeup miss are we taking about here. If intr were NOT disabled,
> how could this happen. Just trying to understand the need for "irqs-disabled" in
> resume_{user,kernel}_*
>
> The intr disabled before reg file restore makes complete sense though.
user irq nmi
|
|
`-----> .
|
|
|
`-----> .
|
|
. <-----'
. <-----'
|
|
So what Andy is saying is that NMI context never sets TIF_NEED_RESCHED,
this means that return from NMI never needs to check for preemption
etc..
Now your return from IRQ obviously should, the normal way. If the IRQ
return gets interrupted by the NMI nothing special should occur. The
return from NMI should simply resume the return from IRQ.
So I'm a little confused by your timer interrupt example, it _should_ do
the preemption, the nested interrupt (NMI) will return to the regular
interrupt which should resume its normal return preemption or not.
Powered by blists - more mailing lists