From: Robert Richter <robert.richter@amd.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"oprofile-list@lists.sourceforge.net"
<oprofile-list@lists.sourceforge.net>,
"Peter Zijlstra" <a.p.zijlstra@chello.nl>,
"Frédéric Weisbecker" <fweisbec@gmail.com>
Subject: Re: [GIT PULL] oprofile fixes for v2.6.37
Date: Thu, 30 Dec 2010 14:08:53 +0100 [thread overview]
Message-ID: <20101230130853.GA21073@erda.amd.com> (raw)
In-Reply-To: <20101229163743.GA27109@elte.hu>
On 29.12.10 11:37:43, Ingo Molnar wrote:
> Hm, i'm not sure this fix is correct:
>
> static int op_amd_init(struct oprofile_operations *ops)
> {
> + /*
> + * init_ibs() preforms implictly cpu-local operations, so pin this
> + * thread to its current CPU
> + */
> + preempt_disable();
> init_ibs();
> + preempt_enable();
>
> If init_ibs() is indeed CPU local, then it needs to be called on all CPUs.
> Does that happen and if not why not? AFAICS it's only called on one CPU.
It is correct to run init_ibs() only on one cpu. It only checks the
ibs capabilities and sets up pci devices (if necessary). It runs only
on one cpu but operates with the local APIC and some MSRs, thus it is
better to disable preemption.
The cpu setup itself runs in op_amd_setup_ctrs() which is per cpu.
-Robert
--
Advanced Micro Devices, Inc.
Operating System Research Center
next prev parent reply other threads:[~2010-12-30 13:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-29 14:47 [GIT PULL] oprofile fixes for v2.6.37 Robert Richter
2010-12-29 16:37 ` Ingo Molnar
2010-12-30 13:08 ` Robert Richter [this message]
2010-12-30 17:38 ` Ingo Molnar
2011-01-03 11:15 ` [PATCH] arch/x86/oprofile/op_model_amd.c: perform initialisation on a single CPU Robert Richter
2011-01-03 12:03 ` Ingo Molnar
2011-01-03 14:44 ` Robert Richter
-- strict thread matches above, loose matches on Subject: below --
2010-10-29 10:04 [GIT PULL] oprofile fixes for v2.6.37 Robert Richter
2010-10-29 10:57 ` Ingo Molnar
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=20101230130853.GA21073@erda.amd.com \
--to=robert.richter@amd.com \
--cc=a.p.zijlstra@chello.nl \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=oprofile-list@lists.sourceforge.net \
/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