]> git.baikalelectronics.ru Git - kernel.git/commit
perf: Optimize hrtimer events
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Tue, 15 Feb 2011 11:41:46 +0000 (12:41 +0100)
committerIngo Molnar <mingo@elte.hu>
Wed, 16 Feb 2011 12:30:57 +0000 (13:30 +0100)
commit15fcc11a74b018c0213d61a2f32bb267915ce6f3
treef48441ff3179a91b4acde6c785726a34e6dc856a
parentb6f99f4d7e6df6855f66b733f7b3d9782fb8f1e7
perf: Optimize hrtimer events

There is no need to re-initialize the hrtimer every time we start it,
so don't do that (shaves a few cycles). Also, since we know hrtimers
run at a fixed rate (nanoseconds) we can pre-compute the desired
frequency at which they tick. This avoids us having to go through the
whole adaptive frequency feedback logic (shaves another few cycles).

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1297448589.5226.47.camel@laptop>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/perf_event.c