From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Robert Richter <robert.richter@amd.com>
Cc: Ingo Molnar <mingo@elte.hu>, linux-kernel@vger.kernel.org
Subject: Re: [tip:perfcounters/core] perfcounters: IRQ and NMI support on AMD CPUs
Date: Thu, 12 Mar 2009 10:12:14 +0100 [thread overview]
Message-ID: <1236849134.5090.26.camel@laptop> (raw)
In-Reply-To: <20090312014415.GD10105@erda.amd.com>
On Thu, 2009-03-12 at 02:44 +0100, Robert Richter wrote:
> On 05.03.09 17:27:29, Peter Zijlstra wrote:
> > Commit-ID: b0f3f28e0f14eb335f67bfaae33ce8b8d74fd58b
> > Gitweb: http://git.kernel.org/tip/b0f3f28e0f14eb335f67bfaae33ce8b8d74fd58b
> > Author: "Peter Zijlstra" <a.p.zijlstra@chello.nl>
> > AuthorDate: Thu, 5 Mar 2009 18:08:27 +0100
> > Commit: Ingo Molnar <mingo@elte.hu>
> > CommitDate: Thu, 5 Mar 2009 18:25:16 +0100
> >
> > perfcounters: IRQ and NMI support on AMD CPUs
> >
> > The below completes the K7+ performance counter support:
> >
> > - IRQ support
> > - NMI support
> >
> > KernelTop output works now as well.
> >
> > Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
> > Cc: Jaswinder Singh Rajput <jaswinder@kernel.org>
> > Cc: Paul Mackerras <paulus@samba.org>
> > LKML-Reference: <1236273633.5187.286.camel@laptop>
> > Signed-off-by: Ingo Molnar <mingo@elte.hu>
> >
> >
> > ---
> > arch/x86/kernel/cpu/perf_counter.c | 272 ++++++++++++++++++++++++++++++------
> > 1 files changed, 228 insertions(+), 44 deletions(-)
> >
> > diff --git a/arch/x86/kernel/cpu/perf_counter.c b/arch/x86/kernel/cpu/perf_counter.c
> > index 3b65f19..6ebe9ab 100644
> > --- a/arch/x86/kernel/cpu/perf_counter.c
> > +++ b/arch/x86/kernel/cpu/perf_counter.c
>
> [...]
>
> > @@ -205,18 +243,24 @@ static u64 pmc_intel_save_disable_all(void)
> >
> > static u64 pmc_amd_save_disable_all(void)
> > {
> > - int idx;
> > - u64 val, ctrl = 0;
> > + struct cpu_hw_counters *cpuc = &__get_cpu_var(cpu_hw_counters);
> > + int enabled, idx;
> > +
> > + enabled = cpuc->enabled;
> > + cpuc->enabled = 0;
> > + barrier();
>
> Peter,
>
> please add comments to all barrier()s you added to this file. Is it
> sufficient in hw_perf_save_disable() to stop NMI's only on the current
> core?
Yes, counters are fundamentally per cpu. But you're right, I'll go
through the code and add comments and fix up some barriers.
next prev parent reply other threads:[~2009-03-12 9:12 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-05 17:20 [PATCH] perfcounters: IRQ and NMI support on AMD CPUs Peter Zijlstra
2009-03-05 17:25 ` Ingo Molnar
2009-03-05 17:27 ` [tip:perfcounters/core] " Peter Zijlstra
2009-03-12 1:44 ` Robert Richter
2009-03-12 9:12 ` Peter Zijlstra [this message]
2009-03-05 18:32 ` [PATCH] " Jaswinder Singh Rajput
2009-03-05 18:45 ` Peter Zijlstra
2009-03-05 18:56 ` Jaswinder Singh Rajput
2009-03-05 19:07 ` Peter Zijlstra
2009-03-05 19:37 ` Jaswinder Singh Rajput
2009-03-05 19:34 ` Peter Zijlstra
2009-03-05 19:41 ` Ingo Molnar
2009-03-05 20:01 ` Jaswinder Singh Rajput
2009-03-06 6:37 ` Mike Galbraith
2009-03-06 6:51 ` Mike Galbraith
2009-03-06 7:11 ` Mike Galbraith
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=1236849134.5090.26.camel@laptop \
--to=a.p.zijlstra@chello.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=robert.richter@amd.com \
/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