diff options
author | Ingo Molnar <mingo@elte.hu> | 2010-03-09 11:11:53 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-03-09 11:11:53 -0500 |
commit | 548b84166917d6f5e2296123b85ad24aecd3801d (patch) | |
tree | 0ab0300e23a02df0fe3c0579627e4998bb122c00 /kernel/perf_event.c | |
parent | cfb581bcd4f8c158c6f2b48bf5e232bb9e6855c0 (diff) | |
parent | 57d54889cd00db2752994b389ba714138652e60c (diff) |
Merge commit 'v2.6.34-rc1' into perf/urgent
Conflicts:
tools/perf/util/probe-event.c
Merge reason: Pick up -rc1 and resolve the conflict as well.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/perf_event.c')
-rw-r--r-- | kernel/perf_event.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/kernel/perf_event.c b/kernel/perf_event.c index 482d5e1d3764..e68745053013 100644 --- a/kernel/perf_event.c +++ b/kernel/perf_event.c | |||
@@ -2595,7 +2595,7 @@ static int perf_mmap(struct file *file, struct vm_area_struct *vma) | |||
2595 | if (user_locked > user_lock_limit) | 2595 | if (user_locked > user_lock_limit) |
2596 | extra = user_locked - user_lock_limit; | 2596 | extra = user_locked - user_lock_limit; |
2597 | 2597 | ||
2598 | lock_limit = current->signal->rlim[RLIMIT_MEMLOCK].rlim_cur; | 2598 | lock_limit = rlimit(RLIMIT_MEMLOCK); |
2599 | lock_limit >>= PAGE_SHIFT; | 2599 | lock_limit >>= PAGE_SHIFT; |
2600 | locked = vma->vm_mm->locked_vm + extra; | 2600 | locked = vma->vm_mm->locked_vm + extra; |
2601 | 2601 | ||
@@ -5466,13 +5466,16 @@ void __init perf_event_init(void) | |||
5466 | register_cpu_notifier(&perf_cpu_nb); | 5466 | register_cpu_notifier(&perf_cpu_nb); |
5467 | } | 5467 | } |
5468 | 5468 | ||
5469 | static ssize_t perf_show_reserve_percpu(struct sysdev_class *class, char *buf) | 5469 | static ssize_t perf_show_reserve_percpu(struct sysdev_class *class, |
5470 | struct sysdev_class_attribute *attr, | ||
5471 | char *buf) | ||
5470 | { | 5472 | { |
5471 | return sprintf(buf, "%d\n", perf_reserved_percpu); | 5473 | return sprintf(buf, "%d\n", perf_reserved_percpu); |
5472 | } | 5474 | } |
5473 | 5475 | ||
5474 | static ssize_t | 5476 | static ssize_t |
5475 | perf_set_reserve_percpu(struct sysdev_class *class, | 5477 | perf_set_reserve_percpu(struct sysdev_class *class, |
5478 | struct sysdev_class_attribute *attr, | ||
5476 | const char *buf, | 5479 | const char *buf, |
5477 | size_t count) | 5480 | size_t count) |
5478 | { | 5481 | { |
@@ -5501,13 +5504,17 @@ perf_set_reserve_percpu(struct sysdev_class *class, | |||
5501 | return count; | 5504 | return count; |
5502 | } | 5505 | } |
5503 | 5506 | ||
5504 | static ssize_t perf_show_overcommit(struct sysdev_class *class, char *buf) | 5507 | static ssize_t perf_show_overcommit(struct sysdev_class *class, |
5508 | struct sysdev_class_attribute *attr, | ||
5509 | char *buf) | ||
5505 | { | 5510 | { |
5506 | return sprintf(buf, "%d\n", perf_overcommit); | 5511 | return sprintf(buf, "%d\n", perf_overcommit); |
5507 | } | 5512 | } |
5508 | 5513 | ||
5509 | static ssize_t | 5514 | static ssize_t |
5510 | perf_set_overcommit(struct sysdev_class *class, const char *buf, size_t count) | 5515 | perf_set_overcommit(struct sysdev_class *class, |
5516 | struct sysdev_class_attribute *attr, | ||
5517 | const char *buf, size_t count) | ||
5511 | { | 5518 | { |
5512 | unsigned long val; | 5519 | unsigned long val; |
5513 | int err; | 5520 | int err; |