]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - include/linux/perf_event.h
perf: Optimize the hotpath by converting the perf output buffer to local_t
[net-next-2.6.git] / include / linux / perf_event.h
index f1f853a9d5eb0cbd0fbca519b9a4904c94b27e07..ce7667616fcbe8bf40cd85c6ffedb3cbd2e3fe02 100644 (file)
@@ -485,6 +485,7 @@ struct perf_guest_info_callbacks {
 #include <linux/ftrace.h>
 #include <linux/cpu.h>
 #include <asm/atomic.h>
+#include <asm/local.h>
 
 #define PERF_MAX_STACK_DEPTH           255
 
@@ -588,20 +589,18 @@ struct perf_mmap_data {
 #ifdef CONFIG_PERF_USE_VMALLOC
        struct work_struct              work;
 #endif
-       int                             data_order;
+       int                             data_order;     /* allocation order  */
        int                             nr_pages;       /* nr of data pages  */
        int                             writable;       /* are we writable   */
        int                             nr_locked;      /* nr pages mlocked  */
 
        atomic_t                        poll;           /* POLL_ for wakeups */
-       atomic_t                        events;         /* event_id limit       */
 
-       atomic_long_t                   head;           /* write position    */
-
-       atomic_t                        wakeup;         /* needs a wakeup    */
-       atomic_t                        lost;           /* nr records lost   */
-
-       atomic_t                        nest;           /* nested writers    */
+       local_t                         head;           /* write position    */
+       local_t                         nest;           /* nested writers    */
+       local_t                         events;         /* event limit       */
+       local_t                         wakeup;         /* needs a wakeup    */
+       local_t                         lost;           /* nr records lost   */
 
        long                            watermark;      /* wakeup watermark  */