]> git.baikalelectronics.ru Git - kernel.git/commit
perf/x86: Add RAPL hrtimer support
authorStephane Eranian <eranian@google.com>
Tue, 12 Nov 2013 16:58:51 +0000 (17:58 +0100)
committerIngo Molnar <mingo@kernel.org>
Wed, 27 Nov 2013 14:31:23 +0000 (15:31 +0100)
commitf7715bb628a17e2ba75347da613fd3def12588c1
tree14bf97737aeb38199bacef7b0f11e1ddfe0b44d8
parentf8e934535dcd7069658b83dd34ec9dc7385d4ec8
perf/x86: Add RAPL hrtimer support

The RAPL PMU counters do not interrupt on overflow.
Therefore, the kernel needs to poll the counters
to avoid missing an overflow. This patch adds
the hrtimer code to do this.

The timer interval is calculated at boot time
based on the power unit used by the HW.

There is one hrtimer per-cpu to handle the case
of multiple simultaneous use across cores on
the same package + hotplug CPU.

Thanks to Maria Dimakopoulou for her contributions
to this patch especially on the math aspects.

Signed-off-by: Stephane Eranian <eranian@google.com>
Reviewed-by: Maria Dimakopoulou <maria.n.dimakopoulou@gmail.com>
Reviewed-by: Andi Kleen <ak@linux.intel.com>
[ Applied 32-bit build fix. ]
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Cc: acme@redhat.com
Cc: jolsa@redhat.com
Cc: zheng.z.yan@intel.com
Cc: bp@alien8.de
Cc: maria.n.dimakopoulou@gmail.com
Link: http://lkml.kernel.org/r/1384275531-10892-5-git-send-email-eranian@google.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/kernel/cpu/perf_event_intel_rapl.c