]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
perf/x86/intel/pt: Prevent redundant WRMSRs
authorAlexander Shishkin <alexander.shishkin@linux.intel.com>
Tue, 5 Nov 2019 08:27:01 +0000 (10:27 +0200)
committerIngo Molnar <mingo@kernel.org>
Wed, 13 Nov 2019 10:06:18 +0000 (11:06 +0100)
commit295c52ee1485e4dee660fc1a0e6ceed6c803c9d3
treef7d128e0f95aa214fb7edd20b565eaae1577f16c
parent670638477aede0d7a355ced04b569214aa3feacd
perf/x86/intel/pt: Prevent redundant WRMSRs

With recent optimizations to AUX and PT buffer management code (high order
AUX allocations, opportunistic Single Range Output), it is far more likely
now that the output MSRs won't need reprogramming on every sched-in.

To avoid needless WRMSRs of those registers, cache their values and only
write them when needed.

Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Link: https://lkml.kernel.org/r/20191105082701.78442-3-alexander.shishkin@linux.intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/events/intel/pt.c
arch/x86/events/intel/pt.h