aboutsummaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2011-03-31 03:33:29 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2011-04-14 13:02:14 -0700
commitf8e3c0bb58a569babfb8d72e7e0655686dbcbab1 (patch)
tree0829ed7f4ecc352cf0ba331c68a44dd44c2c4695 /kernel
parent80b9edca1c11ec8118ab30451af9c1d492770c90 (diff)
downloadlinux-linaro-android-f8e3c0bb58a569babfb8d72e7e0655686dbcbab1.tar.gz
perf: Rebase max unprivileged mlock threshold on top of page size
commit 20443384fe090c5f8aeb016e7e85659c5bbdd69f upstream. Ensure we allow 512 kiB + 1 page for user control without assuming a 4096 bytes page size. Reported-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Stephane Eranian <eranian@google.com> LKML-Reference: <1301535209-9679-1-git-send-email-fweisbec@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/perf_event.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/perf_event.c b/kernel/perf_event.c
index 07fcc8568fa..b2536bd2b6b 100644
--- a/kernel/perf_event.c
+++ b/kernel/perf_event.c
@@ -62,8 +62,8 @@ static struct srcu_struct pmus_srcu;
*/
int sysctl_perf_event_paranoid __read_mostly = 1;
-/* Minimum for 128 pages + 1 for the user control page */
-int sysctl_perf_event_mlock __read_mostly = 516; /* 'free' kb per user */
+/* Minimum for 512 kiB + 1 user control page */
+int sysctl_perf_event_mlock __read_mostly = 512 + (PAGE_SIZE / 1024); /* 'free' kiB per user */
/*
* max perf event sample rate