From: Arnaldo Carvalho de Melo <acme@redhat.com>
To: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] rt/threadirqs: don't need to save irqs in do_hardirq()
Date: Thu, 12 Feb 2009 21:24:59 -0200 [thread overview]
Message-ID: <20090212232459.GD5348@ghostprotocols.net> (raw)
In-Reply-To: <4994ae18.1358560a.454d.403b@mx.google.com>
Em Thu, Feb 12, 2009 at 07:27:08PM +0100, Frederic Weisbecker escreveu:
> do_hardirq() has only one caller do_irqd() in a path where irq are already
> disabled. So we don't need to save irqs while holding desc->lock
>
> Replace spin_lock_irqsave by spin_lock.
>
> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
> ---
> kernel/irq/manage.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
> index ed7c5e3..6e9baf8 100644
> --- a/kernel/irq/manage.c
> +++ b/kernel/irq/manage.c
> @@ -905,7 +905,7 @@ static void do_hardirq(struct irq_desc *desc)
> {
> unsigned long flags;
Can flags be removed too?
> - spin_lock_irqsave(&desc->lock, flags);
> + spin_lock(&desc->lock);
>
> if (!(desc->status & IRQ_INPROGRESS))
> goto out;
> @@ -921,7 +921,7 @@ static void do_hardirq(struct irq_desc *desc)
> else
> thread_do_irq(desc);
> out:
> - spin_unlock_irqrestore(&desc->lock, flags);
> + spin_unlock(&desc->lock);
>
> if (waitqueue_active(&desc->wait_for_handler))
> wake_up(&desc->wait_for_handler);
next prev parent reply other threads:[~2009-02-12 23:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-12 18:27 [PATCH 1/2] rt/threadirqs: don't need to save irqs in do_hardirq() Frederic Weisbecker
2009-02-12 23:24 ` Arnaldo Carvalho de Melo [this message]
2009-02-12 23:27 ` Frederic Weisbecker
2009-02-12 23:37 ` Steven Rostedt
2009-02-12 23:43 ` Arnaldo Carvalho de Melo
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=20090212232459.GD5348@ghostprotocols.net \
--to=acme@redhat.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rostedt@goodmis.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