From: tip-bot for Andi Kleen <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: acme@redhat.com, mingo@kernel.org, torvalds@linux-foundation.org,
hpa@zytor.com, eranian@google.com, ak@linux.intel.com,
linux-kernel@vger.kernel.org, tglx@linutronix.de,
jolsa@redhat.com, alexander.shishkin@linux.intel.com,
vincent.weaver@maine.edu, peterz@infradead.org
Subject: [tip:perf/core] perf/x86/intel: Use new topology_max_smt_threads() in HT leak workaround
Date: Fri, 3 Jun 2016 03:54:23 -0700 [thread overview]
Message-ID: <tip-030ba6cd105c68ce919c5e239853b567490cd059@git.kernel.org> (raw)
In-Reply-To: <1463703002-19686-6-git-send-email-andi@firstfloor.org>
Commit-ID: 030ba6cd105c68ce919c5e239853b567490cd059
Gitweb: http://git.kernel.org/tip/030ba6cd105c68ce919c5e239853b567490cd059
Author: Andi Kleen <ak@linux.intel.com>
AuthorDate: Thu, 19 May 2016 17:09:59 -0700
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Fri, 3 Jun 2016 09:41:25 +0200
perf/x86/intel: Use new topology_max_smt_threads() in HT leak workaround
Now that we have topology_max_smt_threads() use it
to detect the HT workarounds for older CPUs.
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Cc: acme@kernel.org
Cc: jolsa@kernel.org
Link: http://lkml.kernel.org/r/1463703002-19686-6-git-send-email-andi@firstfloor.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
arch/x86/events/intel/core.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/arch/x86/events/intel/core.c b/arch/x86/events/intel/core.c
index 593b167..5081b4c 100644
--- a/arch/x86/events/intel/core.c
+++ b/arch/x86/events/intel/core.c
@@ -3989,16 +3989,14 @@ __init int intel_pmu_init(void)
*/
static __init int fixup_ht_bug(void)
{
- int cpu = smp_processor_id();
- int w, c;
+ int c;
/*
* problem not present on this CPU model, nothing to do
*/
if (!(x86_pmu.flags & PMU_FL_EXCL_ENABLED))
return 0;
- w = cpumask_weight(topology_sibling_cpumask(cpu));
- if (w > 1) {
+ if (topology_max_smt_threads() > 1) {
pr_info("PMU erratum BJ122, BV98, HSD29 worked around, HT is on\n");
return 0;
}
next prev parent reply other threads:[~2016-06-03 10:55 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-20 0:09 Add top down metrics to perf stat Andi Kleen
2016-05-20 0:09 ` [PATCH 1/8] x86/topology: Add topology_max_smt_threads() Andi Kleen
2016-06-03 10:52 ` [tip:perf/core] " tip-bot for Andi Kleen
2016-05-20 0:09 ` [PATCH 2/8] perf/x86: Support sysfs files depending on SMT status Andi Kleen
2016-06-03 10:53 ` [tip:perf/core] " tip-bot for Andi Kleen
2016-05-20 0:09 ` [PATCH 3/8] perf/x86/intel: Add Top Down events to Intel Core Andi Kleen
2016-06-03 10:53 ` [tip:perf/core] perf/x86/intel: Add topdown " tip-bot for Andi Kleen
2016-05-20 0:09 ` [PATCH 4/8] perf/x86/intel: Add Top Down events to Intel Atom Andi Kleen
2016-06-03 10:53 ` [tip:perf/core] perf/x86/intel: Add topdown " tip-bot for Andi Kleen
2016-05-20 0:09 ` [PATCH 5/8] perf/x86/intel: Use new topology_max_smt_threads() in HT leak workaround Andi Kleen
2016-06-03 10:54 ` tip-bot for Andi Kleen [this message]
2016-05-20 0:10 ` [PATCH 6/8] perf stat: Avoid fractional digits for integer scales Andi Kleen
2016-05-23 14:36 ` Arnaldo Carvalho de Melo
2016-05-20 0:10 ` [PATCH 7/8] perf stat: Basic support for TopDown in perf stat Andi Kleen
2016-05-23 14:40 ` Arnaldo Carvalho de Melo
2016-05-20 0:10 ` [PATCH 8/8] perf stat: Add computation of TopDown formulas Andi Kleen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-030ba6cd105c68ce919c5e239853b567490cd059@git.kernel.org \
--to=tipbot@zytor.com \
--cc=acme@redhat.com \
--cc=ak@linux.intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=eranian@google.com \
--cc=hpa@zytor.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=vincent.weaver@maine.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).