From: ashwinc@codeaurora.org (Ashwin Chaugule)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH 05/15] ARM: perf: move active_events into struct arm_pmu
Date: Mon, 22 Aug 2011 14:25:52 -0400 [thread overview]
Message-ID: <4E529F30.4070607@codeaurora.org> (raw)
In-Reply-To: <4B9A4BAF850C914D8DED94776A2C477E073D90C2@nasanexd01f.na.qualcomm.com>
Hi Mark,
>> From: Mark Rutland
>> case PERF_TYPE_RAW:
>> @@ -556,15 +559,14 @@ static int armpmu_event_init(struct perf_event
>> *event)
>>
>> event->destroy = hw_perf_event_destroy;
>>
>> - if (!atomic_inc_not_zero(&active_events)) {
>> - mutex_lock(&pmu_reserve_mutex);
>> - if (atomic_read(&active_events) == 0) {
>> + if (!atomic_inc_not_zero(active_events)) {
>> + mutex_lock(&armpmu->reserve_mutex);
>> + if (atomic_read(active_events) == 0)
Isn't this use of atomic_* still racy ?
http://www.spinics.net/lists/arm-kernel/msg123297.html
Cheers,
Ashwin
--
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
next parent reply other threads:[~2011-08-22 18:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4B9A4BAF850C914D8DED94776A2C477E073D90C2@nasanexd01f.na.qualcomm.com>
2011-08-22 18:25 ` Ashwin Chaugule [this message]
2011-08-22 19:51 ` [RFC PATCH 05/15] ARM: perf: move active_events into struct arm_pmu Will Deacon
2011-08-15 13:55 [RFC PATCH 00/15] ARM: perf: support multiple PMUs Mark Rutland
2011-08-15 13:55 ` [RFC PATCH 05/15] ARM: perf: move active_events into struct arm_pmu Mark Rutland
-- strict thread matches above, loose matches on Subject: below --
2011-04-27 10:20 Mark Rutland
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=4E529F30.4070607@codeaurora.org \
--to=ashwinc@codeaurora.org \
--cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).