summaryrefslogtreecommitdiffstats
path: root/include/linux/perf_counter.h
diff options
context:
space:
mode:
authorPeter Zijlstra2009-05-05 17:50:24 +0200
committerIngo Molnar2009-05-05 20:18:32 +0200
commitc5078f78b455fbf67ea71442c7e7ca8acf9ff095 (patch)
treebdd3b699919f2b23faf13177954e82b570653711 /include/linux/perf_counter.h
parentperf_counter: add ioctl(PERF_COUNTER_IOC_RESET) (diff)
downloadkernel-qcow2-linux-c5078f78b455fbf67ea71442c7e7ca8acf9ff095.tar.gz
kernel-qcow2-linux-c5078f78b455fbf67ea71442c7e7ca8acf9ff095.tar.xz
kernel-qcow2-linux-c5078f78b455fbf67ea71442c7e7ca8acf9ff095.zip
perf_counter: provide an mlock threshold
Provide a threshold to relax the mlock accounting, increasing usability. Each counter gets perf_counter_mlock_kb for free. [ Impact: allow more mmap buffering ] Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Paul Mackerras <paulus@samba.org> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com> LKML-Reference: <20090505155437.112113632@chello.nl> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/perf_counter.h')
-rw-r--r--include/linux/perf_counter.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/perf_counter.h b/include/linux/perf_counter.h
index 0fcbf34a4f73..00081d84169f 100644
--- a/include/linux/perf_counter.h
+++ b/include/linux/perf_counter.h
@@ -358,6 +358,7 @@ struct file;
struct perf_mmap_data {
struct rcu_head rcu_head;
int nr_pages; /* nr of data pages */
+ int nr_locked; /* nr pages mlocked */
atomic_t poll; /* POLL_ for wakeups */
atomic_t head; /* write position */
@@ -575,6 +576,7 @@ struct perf_callchain_entry {
extern struct perf_callchain_entry *perf_callchain(struct pt_regs *regs);
extern int sysctl_perf_counter_priv;
+extern int sysctl_perf_counter_mlock;
extern void perf_counter_init(void);