linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: tip-bot for Thomas Gleixner <tglx@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
	peterz@infradead.org, lethal@linux-sh.org, davem@davemloft.net,
	benh@kernel.crashing.org, heiko.carstens@de.ibm.com,
	frank.rowand@am.sony.com, tglx@linutronix.de
Subject: [tip:irq/core] softirq: Avoid stack switch from ksoftirqd
Date: Tue, 8 Feb 2011 18:39:43 GMT	[thread overview]
Message-ID: <tip-c305d524e5dd3c3c7a6035083e30950bea1b52dc@git.kernel.org> (raw)
In-Reply-To: <alpine.LFD.2.00.1102021704530.31804@localhost6.localdomain6>

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();

      parent reply	other threads:[~2011-02-08 18:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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-bot for Thomas Gleixner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-c305d524e5dd3c3c7a6035083e30950bea1b52dc@git.kernel.org \
    --to=tglx@linutronix.de \
    --cc=benh@kernel.crashing.org \
    --cc=davem@davemloft.net \
    --cc=frank.rowand@am.sony.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=hpa@zytor.com \
    --cc=lethal@linux-sh.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).