]> git.baikalelectronics.ru Git - kernel.git/commit
perf_counter: Fix swcounter context invariance
authorPeter Zijlstra <peterz@infradead.org>
Thu, 13 Aug 2009 07:51:55 +0000 (09:51 +0200)
committerIngo Molnar <mingo@elte.hu>
Thu, 13 Aug 2009 10:18:43 +0000 (12:18 +0200)
commitc90a34449a69c1436d3db43b1565e68194bdee7c
tree0e5601dac2fbc4ca1ff452cebd1adb345b710599
parentcc22521e98037b8b4525239771df01f572b9ca4e
perf_counter: Fix swcounter context invariance

perf_swcounter_is_counting() uses a lock, which means we cannot
use swcounters from NMI or when holding that particular lock,
this is unintended.

The below removes the lock, this opens up race window, but not
worse than the swcounters already experience due to RCU
traversal of the context in perf_swcounter_ctx_event().

This also fixes the hard lockups while opening a lockdep
tracepoint counter.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: stephane eranian <eranian@googlemail.com>
Cc: Corey J Ashford <cjashfor@us.ibm.com>
LKML-Reference: <1250149915.10001.66.camel@twins>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/perf_counter.c