perf/x86: Improve HT workaround GP counter constraint
authorPeter Zijlstra <peterz@infradead.org>
Thu, 21 May 2015 08:57:17 +0000 (10:57 +0200)
committerIngo Molnar <mingo@kernel.org>
Wed, 27 May 2015 07:16:03 +0000 (09:16 +0200)
commitcc1790cf541553263bda024295d7600c7cd7c45d
tree9ddcfe2e7d2805060986c30aef6d0db8361603d9
parentb371b594317869971af326adcf7cd65cabdb4087
perf/x86: Improve HT workaround GP counter constraint

The (SNB/IVB/HSW) HT bug only affects events that can be programmed
onto GP counters, therefore we should only limit the number of GP
counters that can be used per cpu -- iow we should not constrain the
FP counters.

Furthermore, we should only enfore such a limit when there are in fact
exclusive events being scheduled on either sibling.

Reported-by: Vince Weaver <vincent.weaver@maine.edu>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
[ Fixed build fail for the !CONFIG_CPU_SUP_INTEL case. ]
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/kernel/cpu/perf_event.c
arch/x86/kernel/cpu/perf_event.h
arch/x86/kernel/cpu/perf_event_intel.c
arch/x86/kernel/cpu/perf_event_intel_uncore.c