summaryrefslogtreecommitdiff
path: root/fs/resctrl/rdtgroup.c
diff options
context:
space:
mode:
authorBabu Moger <babu.moger@amd.com>2025-09-05 16:34:28 -0500
committerBorislav Petkov (AMD) <bp@alien8.de>2025-09-15 12:47:17 +0200
commit88bee79640aea6192f98c8faae30e0013453479d (patch)
tree640f247ac4d0782102762c313a19491b59c6e2b6 /fs/resctrl/rdtgroup.c
parentcba8222880b88d96f3ed6c8a115e335e552b83a1 (diff)
fs/resctrl: Introduce the interface to modify assignments in a group
Enable the mbm_l3_assignments resctrl file to be used to modify counter assignments of CTRL_MON and MON groups when the "mbm_event" counter assignment mode is enabled. Process the assignment modifications in the following format: <Event>:<Domain id>=<Assignment state>;<Domain id>=<Assignment state> Event: A valid MBM event in the /sys/fs/resctrl/info/L3_MON/event_configs directory. Domain ID: A valid domain ID. When writing, '*' applies the changes to all domains. Assignment states: _ : Unassign a counter. e : Assign a counter exclusively. Examples: $ cd /sys/fs/resctrl $ cat /sys/fs/resctrl/mbm_L3_assignments mbm_total_bytes:0=e;1=e mbm_local_bytes:0=e;1=e To unassign the counter associated with the mbm_total_bytes event on domain 0: $ echo "mbm_total_bytes:0=_" > mbm_L3_assignments $ cat /sys/fs/resctrl/mbm_L3_assignments mbm_total_bytes:0=_;1=e mbm_local_bytes:0=e;1=e To unassign the counter associated with the mbm_total_bytes event on all the domains: $ echo "mbm_total_bytes:*=_" > mbm_L3_assignments $ cat /sys/fs/resctrl/mbm_L3_assignments mbm_total_bytes:0=_;1=_ mbm_local_bytes:0=e;1=e Signed-off-by: Babu Moger <babu.moger@amd.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Reinette Chatre <reinette.chatre@intel.com> Link: https://lore.kernel.org/cover.1757108044.git.babu.moger@amd.com
Diffstat (limited to 'fs/resctrl/rdtgroup.c')
-rw-r--r--fs/resctrl/rdtgroup.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/resctrl/rdtgroup.c b/fs/resctrl/rdtgroup.c
index 519aa6acef5b..bd4a115ffea1 100644
--- a/fs/resctrl/rdtgroup.c
+++ b/fs/resctrl/rdtgroup.c
@@ -1939,9 +1939,10 @@ static struct rftype res_common_files[] = {
},
{
.name = "mbm_L3_assignments",
- .mode = 0444,
+ .mode = 0644,
.kf_ops = &rdtgroup_kf_single_ops,
.seq_show = mbm_L3_assignments_show,
+ .write = mbm_L3_assignments_write,
},
{
.name = "mbm_assign_mode",