diff options
| author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2009-09-21 10:08:49 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2009-10-06 08:21:50 -0400 |
| commit | 906010b2134e14a2e377decbadd357b3d0ab9c6a (patch) | |
| tree | 598b30d08f5ca8df1e00abc295b120fa1bd2c2e2 /include | |
| parent | e13dbd7d75d1ecc315c6e3071b3c4e8fba4f6bec (diff) | |
perf_event: Provide vmalloc() based mmap() backing
Some architectures such as Sparc, ARM and MIPS (basically
everything with flush_dcache_page()) need to deal with dcache
aliases by carefully placing pages in both kernel and user maps.
These architectures typically have to use vmalloc_user() for this.
However, on other architectures, vmalloc() is not needed and has
the downsides of being more restricted and slower than regular
allocations.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: David Miller <davem@davemloft.net>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <1254830228.21044.272.camel@laptop>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/perf_event.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 3a9d36d1e92a..2e6d95f97419 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
| @@ -442,6 +442,7 @@ enum perf_callchain_context { | |||
| 442 | #include <linux/hrtimer.h> | 442 | #include <linux/hrtimer.h> |
| 443 | #include <linux/fs.h> | 443 | #include <linux/fs.h> |
| 444 | #include <linux/pid_namespace.h> | 444 | #include <linux/pid_namespace.h> |
| 445 | #include <linux/workqueue.h> | ||
| 445 | #include <asm/atomic.h> | 446 | #include <asm/atomic.h> |
| 446 | 447 | ||
| 447 | #define PERF_MAX_STACK_DEPTH 255 | 448 | #define PERF_MAX_STACK_DEPTH 255 |
| @@ -513,6 +514,10 @@ struct file; | |||
| 513 | 514 | ||
| 514 | struct perf_mmap_data { | 515 | struct perf_mmap_data { |
| 515 | struct rcu_head rcu_head; | 516 | struct rcu_head rcu_head; |
| 517 | #ifdef CONFIG_PERF_USE_VMALLOC | ||
| 518 | struct work_struct work; | ||
| 519 | #endif | ||
| 520 | int data_order; | ||
| 516 | int nr_pages; /* nr of data pages */ | 521 | int nr_pages; /* nr of data pages */ |
| 517 | int writable; /* are we writable */ | 522 | int writable; /* are we writable */ |
| 518 | int nr_locked; /* nr pages mlocked */ | 523 | int nr_locked; /* nr pages mlocked */ |
