Re: [tip:x86/asm] sched/x86_64: Don't save flags on context switch

From: Andy Lutomirski
Date: Mon Nov 03 2014 - 17:37:36 EST


On Mon, Nov 3, 2014 at 1:58 PM, Oleg Nesterov <oleg@xxxxxxxxxx> wrote:
> On 11/03, Oleg Nesterov wrote:
>>
>> On 11/03, Andy Lutomirski wrote:
>> >
>> > And do we ever have TF set during a context switch? I hope not.
>>
>> I too hope.
>>
>> > Also, what's with 'jmp exit_intr' at the end of retint_kernel? Why
>> > isn't that 'jmp retint_kernel'?
>>
>> Even better, why not "jmp retint_restore_args" ?
>>
>> preempt_schedule_irq() checks need_resched() and returns with irqs
>> disabled, not need to to recheck test_preempt_need_resched() ?

Seems reasonable to me. Want to write the patch?

>
> Btw, why retint_kernel() checks "interrupts on" ? It seems to me that
> that "interrupts off" is not possible, no? And this will be more clear
> when we remove the "exit_intr" label.

We might get there from #MC or from any of a number of synchronous
errors (#GP from xyz_safe, #PF from some atomic uaccess thing or a
vmap fault, etc), and all of those have interrupts off.

--Andy

>
> Oleg.
>



--
Andy Lutomirski
AMA Capital Management, LLC
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/