mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
To: cgroups@vger.kernel.org, x86@kernel.org, tj@kernel.org
Cc: linux-kernel@vger.kernel.org, peter.p.waskiewicz.jr@intel.com
Subject: [RFC PATCH 2/3] x86: Add Cache QoS Monitoring support to x86 perf uncore
Date: Thu, 26 Dec 2013 13:34:38 -0800	[thread overview]
Message-ID: <1388093679-26952-3-git-send-email-peter.p.waskiewicz.jr@intel.com> (raw)
In-Reply-To: <1388093679-26952-1-git-send-email-peter.p.waskiewicz.jr@intel.com>

This patch adds the MSRs and masks for CQM to the x86 uncore.

The actual scheduling functions using the MSRs will be included
in the next patch when the new cgroup subsystem is added, as there
are dependencies on structs from the cgroup.

Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
---
 arch/x86/kernel/cpu/perf_event_intel_uncore.h | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore.h b/arch/x86/kernel/cpu/perf_event_intel_uncore.h
index a80ab71..f788145 100644
--- a/arch/x86/kernel/cpu/perf_event_intel_uncore.h
+++ b/arch/x86/kernel/cpu/perf_event_intel_uncore.h
@@ -412,6 +412,19 @@
 
 #define NHMEX_W_PMON_GLOBAL_FIXED_EN		(1ULL << 31)
 
+#ifdef CONFIG_CGROUP_CACHEQOS
+/* Intel Cache QoS Monitoring uncore support */
+#define IA32_QM_EVTSEL				0xc8d
+#define IA32_QM_CTR				0xc8e
+#define IA32_PQR_ASSOC				0xc8f
+
+#define IA32_QM_EVTSEL_EVTID_READ_OCC		0x01
+#define IA32_QM_CTR_ERR				(0x03llu << 62)
+#define IA32_RMID_PQR_MASK			0x3ff
+#define IA32_QM_EVTSEL_RMID_POSITION		32
+
+#endif /* CONFIG_CGROUP_CACHEQOS */
+
 struct intel_uncore_ops;
 struct intel_uncore_pmu;
 struct intel_uncore_box;
-- 
1.8.3.1


  parent reply	other threads:[~2013-12-26 21:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-26 21:34 [RFC PATCH 0/3] x86: Add Cache QoS Monitoring (CQM) support Peter P Waskiewicz Jr
2013-12-26 21:34 ` [RFC PATCH 1/3] x86: Add support for Cache QoS Monitoring (CQM) detection Peter P Waskiewicz Jr
2013-12-26 21:34 ` Peter P Waskiewicz Jr [this message]
2013-12-26 21:34 ` [RFC PATCH 3/3] cgroup: Add new cacheqos cgroup subsys to support Cache QoS Monitoring Peter P Waskiewicz Jr

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=1388093679-26952-3-git-send-email-peter.p.waskiewicz.jr@intel.com \
    --to=peter.p.waskiewicz.jr@intel.com \
    --cc=cgroups@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tj@kernel.org \
    --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

all inboxes | Powered by JetHome®