Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1493165

Re: NMI for ARC

From Peter Zijlstra <peterz@infradead.org>
Newsgroups linux.kernel
Subject Re: NMI for ARC
Date 2016-09-29 08:50 +0200
Message-ID <smDkm-ut-7@gated-at.bofh.it> (permalink)
References (5 earlier) <smhjP-3Ir-1@gated-at.bofh.it> <smsIh-2pU-3@gated-at.bofh.it> <smtO1-34a-9@gated-at.bofh.it> <smvwt-4hA-7@gated-at.bofh.it> <smykF-5Vn-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: NMI for ARC Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2016-09-28 02:30 +0200
  Re: NMI for ARC Peter Zijlstra <peterz@infradead.org> - 2016-09-28 09:20 +0200
    Re: NMI for ARC Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2016-09-28 20:10 +0200
    Re: NMI for ARC Andy Lutomirski <luto@amacapital.net> - 2016-09-28 21:30 +0200
      Re: NMI for ARC Peter Zijlstra <peterz@infradead.org> - 2016-09-28 22:40 +0200
        Re: NMI for ARC Andy Lutomirski <luto@amacapital.net> - 2016-09-29 00:30 +0200
          Re: NMI for ARC Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2016-09-29 00:50 +0200
            Re: NMI for ARC Andy Lutomirski <luto@amacapital.net> - 2016-09-29 00:50 +0200
          Re: NMI for ARC Vineet Gupta <vgupta@synopsys.com> - 2016-09-29 03:30 +0200
            Re: NMI for ARC Peter Zijlstra <peterz@infradead.org> - 2016-09-29 08:50 +0200
              Re: NMI for ARC Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2016-09-29 18:50 +0200
                Re: NMI for ARC Andy Lutomirski <luto@amacapital.net> - 2016-09-29 21:00 +0200
                Re: NMI for ARC Vineet Gupta <Vineet.Gupta1@synopsys.com> - 2016-09-29 21:50 +0200
                Re: NMI for ARC Peter Zijlstra <peterz@infradead.org> - 2016-09-30 12:50 +0200
            Re: NMI for ARC Andy Lutomirski <luto@amacapital.net> - 2016-09-29 19:40 +0200

csiph-web