]> git.karo-electronics.de Git - linux-beck.git/commitdiff
softirq: Avoid stack switch from ksoftirqd
authorThomas Gleixner <tglx@linutronix.de>
Wed, 2 Feb 2011 16:10:48 +0000 (17:10 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 8 Feb 2011 18:37:12 +0000 (19:37 +0100)
ksoftirqd() calls do_softirq() which switches stacks on several
architectures. That makes no sense at all. ksoftirqd's stack is
sufficient.

Call __do_softirq() directly.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Acked-by: David Miller <davem@davemloft.net>
Cc: Paul Mundt <lethal@linux-sh.org>
Reviewed-by: Frank Rowand <frank.rowand@am.sony.com>
LKML-Reference: <alpine.LFD.2.00.1102021704530.31804@localhost6.localdomain6>

kernel/softirq.c

index 68eb5efec388759b95fa9842576b4f0448fbd195..c0490464e92f04630fc84a071f39a4303842be09 100644 (file)
@@ -738,7 +738,10 @@ static int run_ksoftirqd(void * __bind_cpu)
                           don't process */
                        if (cpu_is_offline((long)__bind_cpu))
                                goto wait_to_die;
-                       do_softirq();
+                       local_irq_disable();
+                       if (local_softirq_pending())
+                               __do_softirq();
+                       local_irq_enable();
                        preempt_enable_no_resched();
                        cond_resched();
                        preempt_disable();