* [PATCH] softirq: Avoid stack switch from ksoftirqd
@ 2011-02-02 16:10 Thomas Gleixner
2011-02-02 16:24 ` Peter Zijlstra
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Thomas Gleixner @ 2011-02-02 16:10 UTC (permalink / raw)
To: LKML
Cc: Peter Zijlstra, Ingo Molnar, Benjamin Herrenschmidt,
Heiko Carstens, David Miller, Paul Mundt
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>
---
kernel/softirq.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
Index: linux-2.6-tip/kernel/softirq.c
===================================================================
--- linux-2.6-tip.orig/kernel/softirq.c
+++ linux-2.6-tip/kernel/softirq.c
@@ -738,7 +738,10 @@ static int run_ksoftirqd(void * __bind_c
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();
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] softirq: Avoid stack switch from ksoftirqd
2011-02-02 16:10 [PATCH] softirq: Avoid stack switch from ksoftirqd Thomas Gleixner
@ 2011-02-02 16:24 ` Peter Zijlstra
2011-02-02 21:51 ` David Miller
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Peter Zijlstra @ 2011-02-02 16:24 UTC (permalink / raw)
To: Thomas Gleixner
Cc: LKML, Ingo Molnar, Benjamin Herrenschmidt, Heiko Carstens,
David Miller, Paul Mundt
On Wed, 2011-02-02 at 17:10 +0100, Thomas Gleixner wrote:
> 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 <a.p.zijlstra@chello.nl>
> ---
> kernel/softirq.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> Index: linux-2.6-tip/kernel/softirq.c
> ===================================================================
> --- linux-2.6-tip.orig/kernel/softirq.c
> +++ linux-2.6-tip/kernel/softirq.c
> @@ -738,7 +738,10 @@ static int run_ksoftirqd(void * __bind_c
> 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();
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] softirq: Avoid stack switch from ksoftirqd
2011-02-02 16:10 [PATCH] softirq: Avoid stack switch from ksoftirqd Thomas Gleixner
2011-02-02 16:24 ` Peter Zijlstra
@ 2011-02-02 21:51 ` David Miller
2011-02-02 23:32 ` Frank Rowand
2011-02-08 18:39 ` [tip:irq/core] " tip-bot for Thomas Gleixner
3 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2011-02-02 21:51 UTC (permalink / raw)
To: tglx; +Cc: linux-kernel, peterz, mingo, benh, heiko.carstens, lethal
From: Thomas Gleixner <tglx@linutronix.de>
Date: Wed, 2 Feb 2011 17:10:48 +0100 (CET)
> 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: David S. Miller <davem@davemloft.net>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] softirq: Avoid stack switch from ksoftirqd
2011-02-02 16:10 [PATCH] softirq: Avoid stack switch from ksoftirqd Thomas Gleixner
2011-02-02 16:24 ` Peter Zijlstra
2011-02-02 21:51 ` David Miller
@ 2011-02-02 23:32 ` Frank Rowand
2011-02-08 18:39 ` [tip:irq/core] " tip-bot for Thomas Gleixner
3 siblings, 0 replies; 5+ messages in thread
From: Frank Rowand @ 2011-02-02 23:32 UTC (permalink / raw)
To: Thomas Gleixner
Cc: LKML, Peter Zijlstra, Ingo Molnar, Benjamin Herrenschmidt,
Heiko Carstens, David Miller, Paul Mundt
On 02/02/11 08:10, Thomas Gleixner wrote:
> 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>
Reviewed-by: Frank Rowand <frank.rowand@am.sony.com>
> ---
> kernel/softirq.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> Index: linux-2.6-tip/kernel/softirq.c
> ===================================================================
> --- linux-2.6-tip.orig/kernel/softirq.c
> +++ linux-2.6-tip/kernel/softirq.c
> @@ -738,7 +738,10 @@ static int run_ksoftirqd(void * __bind_c
> 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();
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [tip:irq/core] softirq: Avoid stack switch from ksoftirqd
2011-02-02 16:10 [PATCH] softirq: Avoid stack switch from ksoftirqd Thomas Gleixner
` (2 preceding siblings ...)
2011-02-02 23:32 ` Frank Rowand
@ 2011-02-08 18:39 ` tip-bot for Thomas Gleixner
3 siblings, 0 replies; 5+ messages in thread
From: tip-bot for Thomas Gleixner @ 2011-02-08 18:39 UTC (permalink / raw)
To: linux-tip-commits
Cc: linux-kernel, hpa, mingo, peterz, lethal, davem, benh,
heiko.carstens, frank.rowand, tglx
Commit-ID: c305d524e5dd3c3c7a6035083e30950bea1b52dc
Gitweb: http://git.kernel.org/tip/c305d524e5dd3c3c7a6035083e30950bea1b52dc
Author: Thomas Gleixner <tglx@linutronix.de>
AuthorDate: Wed, 2 Feb 2011 17:10:48 +0100
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Tue, 8 Feb 2011 19:37:12 +0100
softirq: Avoid stack switch from ksoftirqd
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 | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/kernel/softirq.c b/kernel/softirq.c
index 68eb5ef..c049046 100644
--- a/kernel/softirq.c
+++ b/kernel/softirq.c
@@ -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();
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-02-08 18:40 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-02 16:10 [PATCH] softirq: Avoid stack switch from ksoftirqd Thomas Gleixner
2011-02-02 16:24 ` Peter Zijlstra
2011-02-02 21:51 ` David Miller
2011-02-02 23:32 ` Frank Rowand
2011-02-08 18:39 ` [tip:irq/core] " tip-bot for Thomas Gleixner
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.