summaryrefslogtreecommitdiff
path: root/arch/x86/events
diff options
context:
space:
mode:
authorReinette Chatre <reinette.chatre@intel.com>2018-09-20 22:02:11 +0300
committerThomas Gleixner <tglx@linutronix.de>2018-09-28 23:48:27 +0300
commitdd45407c0b2445bc2aa0ecfea744d5af3a146577 (patch)
tree5aa364d752bc2aa77dc0313f5aa1582aa4034b2e /arch/x86/events
parent0a701c9dd5351cbaef1677a0c8d37950e158cd55 (diff)
downloadlinux-dd45407c0b2445bc2aa0ecfea744d5af3a146577.tar.xz
x86/intel_rdt: Use perf infrastructure for measurements
The success of a cache pseudo-locked region is measured using performance monitoring events that are programmed directly at the time the user requests a measurement. Modifying the performance event registers directly is not appropriate since it circumvents the in-kernel perf infrastructure that exists to manage these resources and provide resource arbitration to the performance monitoring hardware. The cache pseudo-locking measurements are modified to use the in-kernel perf infrastructure. Performance events are created and validated with the appropriate perf API. The performance counters are still read as directly as possible to avoid the additional cache hits. This is done safely by first ensuring with the perf API that the counters have been programmed correctly and only accessing the counters in an interrupt disabled section where they are not able to be moved. As part of the transition to the in-kernel perf infrastructure the L2 and L3 measurements are split into two separate measurements that can be triggered independently. This separation prevents additional cache misses incurred during the extra testing code used to decide if a L2 and/or L3 measurement should be made. Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: fenghua.yu@intel.com Cc: tony.luck@intel.com Cc: peterz@infradead.org Cc: acme@kernel.org Cc: gavin.hindman@intel.com Cc: jithu.joseph@intel.com Cc: dave.hansen@intel.com Cc: hpa@zytor.com Link: https://lkml.kernel.org/r/fc24e728b446404f42c78573c506e98cd0599873.1537468643.git.reinette.chatre@intel.com
Diffstat (limited to 'arch/x86/events')
0 files changed, 0 insertions, 0 deletions