[RFC PATCH 05/15] ARM: perf: move active_events into struct arm_pmu
Ashwin Chaugule
ashwinc at codeaurora.org
Mon Aug 22 14:25:52 EDT 2011
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.
More information about the linux-arm-kernel
mailing list