From: Frederic Weisbecker <fweisbec@gmail.com>
To: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: mingo@elte.hu, David Miller <davem@davemloft.net>,
acme@redhat.com, paulus@samba.org, Mike Galbraith <efault@gmx.de>,
Thomas Gleixner <tglx@linutronix.de>,
linux-kernel@vger.kernel.org, sparclinux@vger.kernel.org,
linux-arch@vger.kernel.org
Subject: Re: [patch 3/3] sched: Use local_irq_save_nmi() in cpu_clock()
Date: Wed, 7 Apr 2010 13:27:12 +0200 [thread overview]
Message-ID: <20100407112707.GA5143@nowhere> (raw)
In-Reply-To: <20100406133141.039454288@chello.nl>
On Tue, Apr 06, 2010 at 03:28:10PM +0200, Peter Zijlstra wrote:
> Since we can call cpu_clock() from NMI context fix up the IRQ
> disabling to conform to the new rules.
>
> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
> ---
> kernel/sched_clock.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> Index: linux-2.6/kernel/sched_clock.c
> ===================================================================
> --- linux-2.6.orig/kernel/sched_clock.c
> +++ linux-2.6/kernel/sched_clock.c
> @@ -241,9 +241,9 @@ unsigned long long cpu_clock(int cpu)
> unsigned long long clock;
> unsigned long flags;
>
> - local_irq_save(flags);
> + local_irq_save_nmi(flags);
> clock = sched_clock_cpu(cpu);
> - local_irq_restore(flags);
> + local_irq_restore_nmi(flags);
>
> return clock;
> }
That seem to add a small overhead in various places.
Do we want to make local_irq_save_nmi == local_irq_save
for archs that have native nmi?
Or cpu_clock_nmi()?
next prev parent reply other threads:[~2010-04-07 11:27 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-06 13:28 [patch 0/3] IRQ disable vs NMI Peter Zijlstra
2010-04-06 13:28 ` Peter Zijlstra
2010-04-06 13:28 ` [patch 1/3] kernel: local_irq_{save,restore}_nmi() Peter Zijlstra
2010-04-06 13:28 ` Peter Zijlstra
2010-04-07 1:13 ` Steven Rostedt
2010-04-07 1:19 ` David Miller
2010-04-07 1:23 ` Steven Rostedt
2010-04-07 1:23 ` Steven Rostedt
2010-04-06 13:28 ` [patch 2/3] perf: Use local_irq_save_nmi() Peter Zijlstra
2010-04-06 13:28 ` Peter Zijlstra
2010-04-06 13:28 ` [patch 3/3] sched: Use local_irq_save_nmi() in cpu_clock() Peter Zijlstra
2010-04-06 13:28 ` Peter Zijlstra
2010-04-07 11:27 ` Frederic Weisbecker [this message]
2010-04-07 11:31 ` Peter Zijlstra
2010-04-07 11:31 ` Peter Zijlstra
2010-04-07 11:44 ` Frederic Weisbecker
2010-04-06 17:54 ` [patch 0/3] IRQ disable vs NMI David Miller
2010-04-06 17:54 ` David Miller
2010-04-06 23:39 ` David Miller
2010-04-06 23:39 ` David Miller
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=20100407112707.GA5143@nowhere \
--to=fweisbec@gmail.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=davem@davemloft.net \
--cc=efault@gmx.de \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulus@samba.org \
--cc=sparclinux@vger.kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).