Re: [patch V6 30/37] x86/entry: Convert reschedule interrupt to IDTENTRY_RAW

From: Thomas Gleixner
Date: Wed May 20 2020 - 11:09:08 EST


Andy Lutomirski <luto@xxxxxxxxxx> writes:

> On Fri, May 15, 2020 at 5:10 PM Thomas Gleixner <tglx@xxxxxxxxxxxxx> wrote:
>>
>>
>> The scheduler IPI does not need the full interrupt entry handling logic
>> when the entry is from kernel mode.
>>
>> Even if tracing is enabled the only requirement is that RCU is watching and
>> preempt_count has the hardirq bit on.
>>
>> The NOHZ tick state does not have to be adjusted. If the tick is not
>> running then the CPU is in idle and the idle exit will restore the
>> tick. Softinterrupts are not raised here, so handling them on return is not
>> required either.
>>
>> User mode entry must go through the regular entry path as it will invoke
>> the scheduler on return so context tracking needs to be in the correct
>> state.
>>
>> Use IDTENTRY_RAW and the RCU conditional variants of idtentry_enter/exit()
>> to guarantee that RCU is watching even if the IPI hits a RCU idle section.
>>
>> Remove the tracepoint static key conditional which is incomplete
>> vs. tracing anyway because e.g. ack_APIC_irq() calls out into
>> instrumentable code.
>>
>> Avoid the overhead of irq time accounting and introduce variants of
>> __irq_enter/exit() so instrumentation observes the correct preempt count
>> state.
>
> Leftover text from an old version?

Indeed

> The code is Reviewed-by: Andy Lutomirski <luto@xxxxxxxxxx>