Peter Zijlstra
0f5a260128
perf: Avoid a useless pmu_disable() in the perf-tick
...
Gleb writes:
> Currently pmu is disabled and re-enabled on each timer interrupt even
> when no rotation or frequency adjustment is needed. On Intel CPU this
> results in two writes into PERF_GLOBAL_CTRL MSR per tick. On bare metal
> it does not cause significant slowdown, but when running perf in a virtual
> machine it leads to 20% slowdown on my machine.
Cure this by keeping a perf_event_context::nr_freq counter that counts the
number of active events that require frequency adjustments and use this in a
similar fashion to the already existing nr_events != nr_active test in
perf_rotate_context().
By being able to exclude both rotation and frequency adjustments a-priory for
the common case we can avoid the otherwise superfluous PMU disable.
Suggested-by: Gleb Natapov <gleb@redhat.com >
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl >
Link: http://lkml.kernel.org/n/tip-515yhoatehd3gza7we9fapaa@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2011-12-06 08:33:52 +01:00
..
2011-11-06 19:44:47 -08:00
2011-12-06 08:33:52 +01:00
2011-11-06 19:44:47 -08:00
2011-11-07 23:02:24 +01:00
2011-10-31 19:30:05 -04:00
2011-12-06 06:43:49 +01:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-11-02 16:07:03 -07:00
2011-10-31 19:30:05 -04:00
2011-09-23 12:05:29 +05:30
2011-11-06 19:44:47 -08:00
2011-11-06 19:44:47 -08:00
2011-11-06 19:44:47 -08:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 17:30:45 -07:00
2011-11-06 19:02:23 -08:00
2011-11-06 19:44:47 -08:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-12-05 13:28:46 -05:00
2011-10-30 15:16:42 +01:00
2011-10-31 09:20:12 -04:00
2011-10-26 13:10:39 +10:30
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:13 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-11-11 08:19:37 +01:00
2011-10-28 12:02:27 -07:00
2011-11-06 19:44:47 -08:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-11-07 07:54:42 +10:30
2011-10-31 09:20:13 -04:00
2011-10-31 09:20:12 -04:00
2011-10-26 16:17:32 +02:00
2011-10-31 09:20:12 -04:00
2011-10-31 17:30:53 -07:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:11 -04:00
2011-09-28 21:38:21 -07:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:13 -04:00
2011-10-31 09:20:13 -04:00
2011-09-28 21:38:46 -07:00
2011-09-28 21:38:48 -07:00
2011-09-28 21:38:22 -07:00
2011-10-31 09:20:12 -04:00
2011-09-28 21:38:48 -07:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-08-14 12:01:11 +02:00
2011-08-14 12:01:11 +02:00
2011-10-06 12:46:56 +02:00
2011-08-14 12:00:41 +02:00
2011-10-06 12:47:04 +02:00
2011-09-13 11:11:55 +02:00
2011-08-14 12:01:13 +02:00
2011-11-06 17:12:03 -08:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-11-06 19:44:47 -08:00
2011-10-31 17:30:44 -07:00
2011-11-06 19:44:47 -08:00
2011-10-03 14:13:01 -04:00
2011-08-12 16:21:35 -05:00
2011-10-31 17:46:07 -07:00
2011-09-19 17:04:37 -07:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-08-10 20:38:14 -04:00
2011-09-19 17:10:57 -07:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-11-06 19:44:47 -08:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 17:30:53 -07:00
2011-10-31 09:20:12 -04:00