* [PATCH V2] x86/intel_rdt: Implement show_options() for resctrlfs
@ 2016-12-02 22:21 Shaohua Li
2016-12-09 13:19 ` [tip:x86/cache] " tip-bot for Shaohua Li
0 siblings, 1 reply; 2+ messages in thread
From: Shaohua Li @ 2016-12-02 22:21 UTC (permalink / raw)
To: linux-kernel; +Cc: Fenghua Yu, Thomas Gleixner
Implement show_options() callback for intel resource control filesystem
to expose the active mount options in /proc/
This applies to tip tree x86/cache branch.
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Shaohua Li <shli@fb.com>
---
arch/x86/kernel/cpu/intel_rdt_rdtgroup.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c b/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c
index 1afd3f3..8af04af 100644
--- a/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c
+++ b/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c
@@ -1036,9 +1036,17 @@ static int rdtgroup_rmdir(struct kernfs_node *kn)
return ret;
}
+static int rdtgroup_show_options(struct seq_file *seq, struct kernfs_root *kf)
+{
+ if (rdt_resources_all[RDT_RESOURCE_L3DATA].enabled)
+ seq_puts(seq, ",cdp");
+ return 0;
+}
+
static struct kernfs_syscall_ops rdtgroup_kf_syscall_ops = {
- .mkdir = rdtgroup_mkdir,
- .rmdir = rdtgroup_rmdir,
+ .mkdir = rdtgroup_mkdir,
+ .rmdir = rdtgroup_rmdir,
+ .show_options = rdtgroup_show_options,
};
static int __init rdtgroup_setup_root(void)
--
2.9.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [tip:x86/cache] x86/intel_rdt: Implement show_options() for resctrlfs
2016-12-02 22:21 [PATCH V2] x86/intel_rdt: Implement show_options() for resctrlfs Shaohua Li
@ 2016-12-09 13:19 ` tip-bot for Shaohua Li
0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Shaohua Li @ 2016-12-09 13:19 UTC (permalink / raw)
To: linux-tip-commits; +Cc: tglx, linux-kernel, shli, hpa, fenghua.yu, mingo
Commit-ID: 76ae054c69a745ded388fc4ae70422d74c5bc77d
Gitweb: http://git.kernel.org/tip/76ae054c69a745ded388fc4ae70422d74c5bc77d
Author: Shaohua Li <shli@fb.com>
AuthorDate: Fri, 2 Dec 2016 14:21:06 -0800
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Fri, 9 Dec 2016 14:12:18 +0100
x86/intel_rdt: Implement show_options() for resctrlfs
Implement show_options() callback for intel resource control filesystem
to expose the active mount options in /proc/
Signed-off-by: Shaohua Li <shli@fb.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Link: http://lkml.kernel.org/r/7dce7c1886ac9289442d254ea18322c92bd968da.1480717072.git.shli@fb.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
arch/x86/kernel/cpu/intel_rdt_rdtgroup.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c b/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c
index 1afd3f3..8af04af 100644
--- a/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c
+++ b/arch/x86/kernel/cpu/intel_rdt_rdtgroup.c
@@ -1036,9 +1036,17 @@ out:
return ret;
}
+static int rdtgroup_show_options(struct seq_file *seq, struct kernfs_root *kf)
+{
+ if (rdt_resources_all[RDT_RESOURCE_L3DATA].enabled)
+ seq_puts(seq, ",cdp");
+ return 0;
+}
+
static struct kernfs_syscall_ops rdtgroup_kf_syscall_ops = {
- .mkdir = rdtgroup_mkdir,
- .rmdir = rdtgroup_rmdir,
+ .mkdir = rdtgroup_mkdir,
+ .rmdir = rdtgroup_rmdir,
+ .show_options = rdtgroup_show_options,
};
static int __init rdtgroup_setup_root(void)
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-12-09 13:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-02 22:21 [PATCH V2] x86/intel_rdt: Implement show_options() for resctrlfs Shaohua Li
2016-12-09 13:19 ` [tip:x86/cache] " tip-bot for Shaohua Li
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).