aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/perf_event.h
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2010-05-18 04:50:41 -0400
committerIngo Molnar <mingo@elte.hu>2010-05-18 12:35:48 -0400
commitef60777c9abd999db5eb4e338aae3eb593ae8e10 (patch)
tree2dee468a922ebea2241d1c1ec10e581d62bf2db6 /include/linux/perf_event.h
parentc7920614cebbf269a7c8397ff959a8dcf727465c (diff)
perf: Optimize the perf_output() path by removing IRQ-disables
Since we can now assume there is only a single writer to each buffer, we can remove per-cpu lock thingy and use a simply nest-count to the same effect. This removes the need to disable IRQs. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> LKML-Reference: <new-submission> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/perf_event.h')
-rw-r--r--include/linux/perf_event.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
index 0b521fc8f5b0..f1f853a9d5eb 100644
--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
@@ -597,12 +597,12 @@ struct perf_mmap_data {
597 atomic_t events; /* event_id limit */ 597 atomic_t events; /* event_id limit */
598 598
599 atomic_long_t head; /* write position */ 599 atomic_long_t head; /* write position */
600 atomic_long_t done_head; /* completed head */
601 600
602 atomic_t lock; /* concurrent writes */
603 atomic_t wakeup; /* needs a wakeup */ 601 atomic_t wakeup; /* needs a wakeup */
604 atomic_t lost; /* nr records lost */ 602 atomic_t lost; /* nr records lost */
605 603
604 atomic_t nest; /* nested writers */
605
606 long watermark; /* wakeup watermark */ 606 long watermark; /* wakeup watermark */
607 607
608 struct perf_event_mmap_page *user_page; 608 struct perf_event_mmap_page *user_page;
@@ -807,7 +807,6 @@ struct perf_output_handle {
807 unsigned long offset; 807 unsigned long offset;
808 int nmi; 808 int nmi;
809 int sample; 809 int sample;
810 int locked;
811}; 810};
812 811
813#ifdef CONFIG_PERF_EVENTS 812#ifdef CONFIG_PERF_EVENTS