public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* perf_disable()
@ 2010-06-11 16:29 Peter Zijlstra
  2010-06-11 16:52 ` perf_disable() Robert Richter
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Peter Zijlstra @ 2010-06-11 16:29 UTC (permalink / raw)
  To: paulus, stephane eranian, Robert Richter, Will Deacon, Paul Mundt; +Cc: LKML

Hi,

I've been going over perf_disable() usage in kernel/perf_event.c and
wondered if we actually need it at all.

Currently the only thing we seem to require it for is around pmu::enable
calls (and for that powerpc at least does it itself, on x86 we rely on
it to call ->enable_all and reprogram the pmu state).

But I can't really find any NMI races wrt data structures or the like as
seems implied by some comments. 

There is a fun little recursion issue with perf_adjust_period(), where
if we fully removed perf_disable() we could end up calling pmu::stop()
twice and such.

But aside from that it looks to me its mostly about optimizing hardware
writes.

If nobody else known about/can find anything, I'm going to mostly remove
perf_disable() for now and later think about how to optimize the
hardware writes again.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-06-14  9:23 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-11 16:29 perf_disable() Peter Zijlstra
2010-06-11 16:52 ` perf_disable() Robert Richter
2010-06-11 17:17 ` perf_disable() Frederic Weisbecker
2010-06-11 20:29   ` perf_disable() Peter Zijlstra
2010-06-11 21:01     ` perf_disable() Frederic Weisbecker
2010-06-11 21:04 ` perf_disable() Frederic Weisbecker
2010-06-11 21:25   ` perf_disable() Peter Zijlstra
2010-06-14  9:23 ` perf_disable() Will Deacon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox