question about softirqs

David Miller davem at davemloft.net
Sat May 9 09:53:58 EST 2009


From: Paul Mackerras <paulus at samba.org>
Date: Sat, 9 May 2009 09:34:29 +1000

> If a soft irq is raised in process context, raise_softirq() in
> kernel/softirq.c calls wakeup_softirqd() to make sure that ksoftirqd
> runs soon to process the soft irq.  So what would happen is that we
> would see the TIF_RESCHED_PENDING flag on the current task in the
> syscall exit path and call schedule() which would switch to ksoftirqd
> to process the soft irq (if it hasn't already been processed by that
> stage).
> 
> If the soft irq is raised in interrupt context, then the soft irq gets
> run via the do_softirq() call in irq_exit(), as you saw.
> 
> The soft irq stuff is pretty much all generic code these days, except
> for the code to switch to the softirq stack.

Grumble, when did that happen :-(

That's horrible for latency compared to handling it directly
in the trap return path.



More information about the Linuxppc-dev mailing list