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

From: Thomas Gleixner
Date: Sun Sep 26 2021 - 11:16:18 EST


On Sat, Sep 25 2021 at 11:31, Christoph Hellwig wrote:

> On Fri, Sep 24, 2021 at 11:47:55AM +0200, Sebastian Andrzej Siewior wrote:
>> + if (local_softirq_pending()) {
>> +
>> + if (!IS_ENABLED(CONFIG_PREEMPT_RT)) {
>> + do_softirq();
>> + } else {
>> + struct task_struct *ksoftirqd = this_cpu_ksoftirqd();
>> +
>> + if (ksoftirqd && !task_is_running(ksoftirqd))
>> + wake_up_process(ksoftirqd);
>> + }
>> + }
>
> At a cosmetic level this looks pretty weird. Why the empty line inside
> the indented block? Why the pointless negation instead of the obvious
> more straightforward order?

Yeah, the empty line is stray.

The negation is because quite some people complained in the past about
doing it the other way round as they want to see the !RT case first.

De gustibus non est disputandum :)

Thanks,

tglx