From: Kanaka Juvva <kanaka.d.juvva@linux.intel.com>
To: kanaka.d.juvva@intel.com, glenn.p.williamson@intel.com,
matt.fleming@intel.com, will.auld@intel.com, andi@firstfloor.org,
linux-kernel@vger.kernel.org, tony.luck@intel.com,
peterz@infradead.org, tglx@linutronix.de, tj@kernel.org,
x86@kernel.org, mingo@redhat.com, hpa@zytor.com,
vikas.shivappa@intel.com
Subject: [PATCH v3 2/2] perf,x86: skip intel_cqm_stable if CMT is not present in a CPU model
Date: Sat, 8 Aug 2015 00:36:19 -0700 [thread overview]
Message-ID: <1439019379-10025-1-git-send-email-kanaka.d.juvva@linux.intel.com> (raw)
CMT and MBM are complementary technologies. One technology doesn't
imply the other technology. If CMT is not present in your CPU model
intel_cqm_stable() won't be called when computing a free RMID. This
is because, LLC_OCCUPANCY reading in this case doesn't apply and
shouldn't be used a criteria for freeing or picking an RMID.
Signed-off-by: Kanaka Juvva <kanaka.d.juvva@linux.intel.com>
---
arch/x86/kernel/cpu/perf_event_intel_cqm.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/arch/x86/kernel/cpu/perf_event_intel_cqm.c b/arch/x86/kernel/cpu/perf_event_intel_cqm.c
index 63eb68b..7aa3bc0 100644
--- a/arch/x86/kernel/cpu/perf_event_intel_cqm.c
+++ b/arch/x86/kernel/cpu/perf_event_intel_cqm.c
@@ -125,6 +125,7 @@ struct cqm_rmid_entry {
enum rmid_recycle_state state;
struct list_head list;
unsigned long queue_time;
+ bool config;
};
/*
@@ -232,6 +233,7 @@ static int intel_cqm_setup_rmid_cache(void)
INIT_LIST_HEAD(&entry->list);
entry->rmid = r;
+ entry->config = false;
cqm_rmid_ptrs[r] = entry;
list_add_tail(&entry->list, &cqm_rmid_free_lru);
@@ -568,7 +570,8 @@ static bool intel_cqm_rmid_stabilize(unsigned int *available)
/*
* Test whether an RMID is free for each package.
*/
- on_each_cpu_mask(&cqm_cpumask, intel_cqm_stable, NULL, true);
+ if (entry->config)
+ on_each_cpu_mask(&cqm_cpumask, intel_cqm_stable, NULL, true);
list_for_each_entry_safe(entry, tmp, &cqm_rmid_limbo_lru, list) {
/*
@@ -1003,6 +1006,12 @@ static void intel_cqm_event_start(struct perf_event *event, int mode)
}
state->rmid = rmid;
+ if (event->attr.config & QOS_L3_OCCUP_EVENT_ID) {
+ struct cqm_rmid_entry *entry;
+
+ entry = __rmid_entry(rmid);
+ entry->config = true;
+ }
wrmsr(MSR_IA32_PQR_ASSOC, rmid, state->closid);
}
--
2.1.0
next reply other threads:[~2015-08-08 7:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-08 7:36 Kanaka Juvva [this message]
2015-08-17 13:16 ` Matt Fleming
2015-08-18 17:09 ` Matt Fleming
2015-08-20 10:41 ` Matt Fleming
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=1439019379-10025-1-git-send-email-kanaka.d.juvva@linux.intel.com \
--to=kanaka.d.juvva@linux.intel.com \
--cc=andi@firstfloor.org \
--cc=glenn.p.williamson@intel.com \
--cc=hpa@zytor.com \
--cc=kanaka.d.juvva@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=matt.fleming@intel.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=tj@kernel.org \
--cc=tony.luck@intel.com \
--cc=vikas.shivappa@intel.com \
--cc=will.auld@intel.com \
--cc=x86@kernel.org \
/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
Powered by JetHome