Re: [PATCH] usb: don't offload isochronous urb completions to ksoftirq
From: Steven Rostedt
Date: Thu Jun 14 2018 - 18:35:54 EST
On Thu, 14 Jun 2018 18:23:11 -0400 (EDT)
Mikulas Patocka <mpatocka@xxxxxxxxxx> wrote:
> I don't think it's so easy. The kernel 2.4 and below did this. And the
> problem was that if there's a storm of network packets, the softirq code
> would cause lockup of the whole machine. In order to not lockup the
> machine - somewhere in the 2.4 cycle - the ksoftirqd thread was
> introduced.
>
> If you have CONFIG_PREEMPT_RT_FULL and you call softirqs in the interrupt
> thread, you could only stall the interrupt thread. If you do the same
> thing without CONFIG_PREEMPT_RT_FULL, you stall the whole CPU.
>
Note, PREEMPT_RT also uses ksoftirqd too. Although we may set it to RT
prio 1. It is triggered if the softirq itself raises a softirq of the
same kind, and then the work is passed off to the ksoftirqd.
Causing the interrupt thread to stall (or by going into a loop of
softirqs) is likely to lock up the CPU on RT too, as interrupt threads
are usually run at priority 50, which will keep normal threads from
running on that CPU.
-- Steve