diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2009-11-16 12:45:14 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-11-16 13:27:45 +0100 |
commit | 559fdc3c1b624edb1933a875022fe7e27934d11c (patch) | |
tree | b722805dbebd9584ffb981e2be84385ee0e22c67 /include | |
parent | 7255fe2a42c612f2b8fe4c347f0a5f0c97d85a46 (diff) | |
download | linux-559fdc3c1b624edb1933a875022fe7e27934d11c.tar.gz linux-559fdc3c1b624edb1933a875022fe7e27934d11c.tar.bz2 linux-559fdc3c1b624edb1933a875022fe7e27934d11c.zip |
perf_event: Optimize perf_output_lock()
The purpose of perf_output_{un,}lock() is to:
1) avoid publishing incomplete data
[ possible when publishing a head that is ahead of an entry
that is still being written ]
2) guarantee fwd progress
[ a simple refcount on pending writers doesn't need to drop to
0, making it so would end up implementing something like forced
quiecent states of RCU ]
To satisfy the above without undue complexity it serializes
between CPUs, this means that a pending writer can only be the
same cpu in a nested context, and since (under normal operation)
a cpu always makes progress we're good -- if the head is only
published when the bottom most writer completes.
Now we don't need to disable IRQs in order to serialize between
CPUs, disabling preemption ought to be sufficient, esp since we
already deal with nesting due to NMIs.
This avoids potentially expensive (and needless) local IRQ
disable/enable ops.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <1258373161.26714.254.camel@laptop>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/perf_event.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index df4e73e33774..7f87563c8485 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h @@ -714,7 +714,6 @@ struct perf_output_handle { int nmi; int sample; int locked; - unsigned long flags; }; #ifdef CONFIG_PERF_EVENTS |