]> git.baikalelectronics.ru Git - kernel.git/commit
x86/intel_rdt: Use perf infrastructure for measurements
authorReinette Chatre <reinette.chatre@intel.com>
Thu, 20 Sep 2018 19:02:11 +0000 (12:02 -0700)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 28 Sep 2018 20:48:27 +0000 (22:48 +0200)
commit2765e05c7a4f72d784bfaf83d01204b3a971aa2f
tree5aa364d752bc2aa77dc0313f5aa1582aa4034b2e
parente0de0e134c331f5bb33e0ec2a7b020f4bcc908ef
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
Documentation/x86/intel_rdt_ui.txt
arch/x86/kernel/cpu/intel_rdt_pseudo_lock.c