Re: [PATCH v3] smp: Wake ksoftirqd on PREEMPT_RT instead do_softirq().

From: Sebastian Andrzej Siewior
Date: Fri Mar 18 2022 - 03:34:23 EST


On 2022-02-08 17:54:08 [+0100], To linux-kernel@xxxxxxxxxxxxxxx wrote:
> --- a/kernel/smp.c
> +++ b/kernel/smp.c
> @@ -691,10 +691,25 @@ void flush_smp_call_function_from_idle(v
> cfd_seq_store(this_cpu_ptr(&cfd_seq_local)->idle, CFD_SEQ_NOCPU,
> smp_processor_id(), CFD_SEQ_IDLE);
> local_irq_save(flags);
> - flush_smp_call_function_queue(true);
> - if (local_softirq_pending())
> - do_softirq();

One thing I noticed while looking for a possible PI-boost from idle/
sched_core_balance(): Interrupts are disabled by the caller right before
calling this function or that local_irq_save() here. That do_softirq()
below, may enable interrupts while invoking softirqs. Both caller don't
have a lock acquired so it should be okay.

Sebastian