diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2011-02-16 05:22:34 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-02-16 07:30:55 -0500 |
commit | 163ec4354a5135c6c38c3f4a9b46a31900ebdf48 (patch) | |
tree | 59063e726453ace397c66d95cab09ac43265be41 /kernel/sysctl.c | |
parent | 4979d2729af22f6ce8faa325fc60a85a2c2daa02 (diff) |
perf: Optimize throttling code
By pre-computing the maximum number of samples per tick we can avoid a
multiplication and a conditional since MAX_INTERRUPTS >
max_samples_per_tick.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sysctl.c')
-rw-r--r-- | kernel/sysctl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 0f1bd83db985..daef911cbadb 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c | |||
@@ -948,7 +948,7 @@ static struct ctl_table kern_table[] = { | |||
948 | .data = &sysctl_perf_event_sample_rate, | 948 | .data = &sysctl_perf_event_sample_rate, |
949 | .maxlen = sizeof(sysctl_perf_event_sample_rate), | 949 | .maxlen = sizeof(sysctl_perf_event_sample_rate), |
950 | .mode = 0644, | 950 | .mode = 0644, |
951 | .proc_handler = proc_dointvec, | 951 | .proc_handler = perf_proc_update_handler, |
952 | }, | 952 | }, |
953 | #endif | 953 | #endif |
954 | #ifdef CONFIG_KMEMCHECK | 954 | #ifdef CONFIG_KMEMCHECK |