From: Will Deacon <will.deacon@arm.com>
To: Ming Lei <tom.leiming@gmail.com>
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>,
linux-kernel@vger.kernel.org, oprofile-list@lists.sf.net,
Robert Richter <robert.richter@amd.com>
Subject: Re: [PATCH v2] oprofile: add SMP barriers for hrtimer hotplug code
Date: Tue, 01 Feb 2011 17:08:27 +0000 [thread overview]
Message-ID: <1296580107.13713.1.camel@e102144-lin.cambridge.arm.com> (raw)
In-Reply-To: <AANLkTimBTrqOk_ctBKmT0c=teZ8oG3c7Ai6-BmZwOj+g@mail.gmail.com>
On Tue, 2011-02-01 at 08:03 +0000, Ming Lei wrote:
> Hi,
>
Hello Lei Ming,
> 2011/2/1 Santosh Shilimkar <santosh.shilimkar@ti.com>:
> >> -----Original Message-----
> >> From: Will Deacon [mailto:will.deacon@arm.com]
> >> diff --git a/drivers/oprofile/timer_int.c
> >> b/drivers/oprofile/timer_int.c
> >> index 0107251..a3a94ea 100644
> >> --- a/drivers/oprofile/timer_int.c
> >> +++ b/drivers/oprofile/timer_int.c
> >> @@ -48,6 +48,7 @@ static int oprofile_hrtimer_start(void)
> >> {
> >> get_online_cpus();
> >> ctr_running = 1;
> >> + smp_mb();
> >> on_each_cpu(__oprofile_hrtimer_start, NULL, 1);
>
> Just a little question:
>
> Before calling __oprofile_hrtimer_start in other CPUs,
> there have been some smp_mb executed already, such as called by
> smp_call_function_many in current CPU, and called by
> generic_smp_call_function_interrupt in the func-calling CPU,
> so are these smp_mb enough for correct order of access
> for 'ctr_running' ?
I didn't dive into the guts of the cross-calling implementation, but it
appears that you're correct. There's also the csd_{un}lock functions
which have smp_mb() in them too, so I think we have plenty of barrier
goodness as it is.
I'll trash the patch.
Cheers,
Will
prev parent reply other threads:[~2011-02-01 17:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-31 17:53 Will Deacon
2011-02-01 5:27 ` Santosh Shilimkar
2011-02-01 8:03 ` Ming Lei
2011-02-01 17:08 ` Will Deacon [this message]
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=1296580107.13713.1.camel@e102144-lin.cambridge.arm.com \
--to=will.deacon@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oprofile-list@lists.sf.net \
--cc=robert.richter@amd.com \
--cc=santosh.shilimkar@ti.com \
--cc=tom.leiming@gmail.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
all inboxes | Powered by JetHome®