]> git.baikalelectronics.ru Git - kernel.git/commit
perf: Optimize throttling code
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Wed, 16 Feb 2011 10:22:34 +0000 (11:22 +0100)
committerIngo Molnar <mingo@elte.hu>
Wed, 16 Feb 2011 12:30:55 +0000 (13:30 +0100)
commitb6f99f4d7e6df6855f66b733f7b3d9782fb8f1e7
tree59063e726453ace397c66d95cab09ac43265be41
parent8c89a0883b58d0af8363a21b666a2ed06fbcfded
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>
include/linux/perf_event.h
kernel/perf_event.c
kernel/sysctl.c