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 s
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.
On Wed, Sep 28, 2016 at 3:44 PM, Vineet Gupta
wrote:
> On 09/28/2016 03:26 PM, Andy Lutomirski wrote:
>> 2. The low level return code, resume_user_mode_begin and/or
>> resume_kernel_mode
>> > > >> require interrupt safety, does that need to be NMI safe as well.
>> > > >> We ofcou
On 09/28/2016 03:26 PM, Andy Lutomirski wrote:
> 2. The low level return code, resume_user_mode_begin and/or
> resume_kernel_mode
> > > >> require interrupt safety, does that need to be NMI safe as well.
> > > >> We ofcourse want
> > > >> the very late register restore parts t
On Sep 28, 2016 1:37 PM, "Peter Zijlstra" wrote:
>
> On Wed, Sep 28, 2016 at 12:25:11PM -0700, Andy Lutomirski wrote:
> > > Yes. If the NMI returns to kernel space you must not attempt preemption
> > > for reasons you found :-),
> >
> > Last time I looked at this, I decided that there was no reaso
On Wed, Sep 28, 2016 at 12:25:11PM -0700, Andy Lutomirski wrote:
> > Yes. If the NMI returns to kernel space you must not attempt preemption
> > for reasons you found :-),
>
> Last time I looked at this, I decided that there was no reason that
> NMIs would ever need to handle preemption. Even if
On Wed, Sep 28, 2016 at 12:16 AM, Peter Zijlstra wrote:
> On Tue, Sep 27, 2016 at 05:22:13PM -0700, Vineet Gupta wrote:
>
>> > Yeah, Sparc64 might be a better example, it more closely matches your
>> > hardware. See
>> > arch/sparc/include/asm/irqflags_64.h:arch_local_irq_save().
>>
>> So I finall
On 09/28/2016 12:16 AM, Peter Zijlstra wrote:
>> 1. Is it OK in general to short-circuit preemption off irq checks for NMI
>> style
>> > interrupts.
> Yes. If the NMI returns to kernel space you must not attempt preemption
> for reasons you found :-), if the NMI returns to userspace you should do
On Tue, Sep 27, 2016 at 05:22:13PM -0700, Vineet Gupta wrote:
> > Yeah, Sparc64 might be a better example, it more closely matches your
> > hardware. See
> > arch/sparc/include/asm/irqflags_64.h:arch_local_irq_save().
>
> So I finally got around to doing this and as expected has turned out to be