mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: LKML <linux-kernel@vger.kernel.org>, Ingo Molnar <mingo@elte.hu>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Heiko Carstens <heiko.carstens@de.ibm.com>,
	David Miller <davem@davemloft.net>,
	Paul Mundt <lethal@linux-sh.org>
Subject: Re: [PATCH] softirq: Avoid stack switch from ksoftirqd
Date: Wed, 02 Feb 2011 17:24:56 +0100	[thread overview]
Message-ID: <1296663896.26581.341.camel@laptop> (raw)
In-Reply-To: <alpine.LFD.2.00.1102021704530.31804@localhost6.localdomain6>

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




  reply	other threads:[~2011-02-02 16:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-02 16:10 Thomas Gleixner
2011-02-02 16:24 ` Peter Zijlstra [this message]
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

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=1296663896.26581.341.camel@laptop \
    --to=peterz@infradead.org \
    --cc=benh@kernel.crashing.org \
    --cc=davem@davemloft.net \
    --cc=heiko.carstens@de.ibm.com \
    --cc=lethal@linux-sh.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    /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

Powered by JetHome