]> 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)
commitf1eb387a7b18f63915e33fb5fd34aa31bbd1557b
tree14bf97737aeb38199bacef7b0f11e1ddfe0b44d8
parent569487e9ffcae48b52e2f9d6a4dbb9c32750cac2
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