linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Fenghua Yu <fenghua.yu@intel.com>
To: "Thomas Gleixner" <tglx@linutronix.de>,
	"Ingo Molnar" <mingo@redhat.com>, "H Peter Anvin" <hpa@zytor.com>,
	"Tony Luck" <tony.luck@intel.com>
Cc: "linux-kernel" <linux-kernel@vger.kernel.org>,
	"x86" <x86@kernel.org>, Xiaochen Shen <xiaochen.shen@intel.com>,
	Fenghua Yu <fenghua.yu@intel.com>
Subject: [PATCH v2] x86/intel_rdt: Show missing resctrl mount options
Date: Wed, 12 Sep 2018 16:48:38 -0700	[thread overview]
Message-ID: <1536796118-60135-1-git-send-email-fenghua.yu@intel.com> (raw)

From: Xiaochen Shen <xiaochen.shen@intel.com>

In resctrl filesystem, we have some mount options to enable
L3/L2 CDP and MBA Software Controller features if platform supports them:
     mount -t resctrl resctrl [-o cdp[,cdpl2][,mba_MBps]] /sys/fs/resctrl

But currently only "cdp" option can be displayed. "cdpl2" and "mba_MBps"
options are not showed even when they are active mount options.

Before this patch:
     #mount -t resctrl resctrl -o cdp,mba_MBps /sys/fs/resctrl
     #grep resctrl /proc/mounts
     /sys/fs/resctrl /sys/fs/resctrl resctrl rw,relatime,cdp 0 0
After this patch:
     #mount -t resctrl resctrl -o cdp,mba_MBps /sys/fs/resctrl
     #grep resctrl /proc/mountts
     /sys/fs/resctrl /sys/fs/resctrl resctrl rw,relatime,cdp,mba_MBps 0 0

Signed-off-by: Xiaochen Shen <xiaochen.shen@intel.com>
Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
---
 arch/x86/kernel/cpu/intel_rdt_rdtgroup.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c b/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c
index b799c00bef09..82459a41fa84 100644
--- a/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c
+++ b/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c
@@ -2760,6 +2760,13 @@ static int rdtgroup_show_options(struct seq_file *seq, struct kernfs_root *kf)
 {
 	if (rdt_resources_all[RDT_RESOURCE_L3DATA].alloc_enabled)
 		seq_puts(seq, ",cdp");
+
+	if (rdt_resources_all[RDT_RESOURCE_L2DATA].alloc_enabled)
+		seq_puts(seq, ",cdpl2");
+
+	if (is_mba_sc(&rdt_resources_all[RDT_RESOURCE_MBA]))
+		seq_puts(seq, ",mba_MBps");
+
 	return 0;
 }
 
-- 
2.19.0


             reply	other threads:[~2018-09-12 23:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-12 23:48 Fenghua Yu [this message]
2018-10-03 14:22 ` [tip:x86/cache] x86/intel_rdt: Show missing resctrl mount options tip-bot for Xiaochen Shen
2018-10-03 19:58 ` tip-bot for Xiaochen Shen

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=1536796118-60135-1-git-send-email-fenghua.yu@intel.com \
    --to=fenghua.yu@intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --cc=x86@kernel.org \
    --cc=xiaochen.shen@intel.com \
    /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).