diff options
author | Babu Moger <babu.moger@amd.com> | 2025-09-06 00:34:17 +0300 |
---|---|---|
committer | Borislav Petkov (AMD) <bp@alien8.de> | 2025-09-15 13:22:24 +0300 |
commit | aab2c5088cdb26e80d51ffbe72d24ab23fa1533e (patch) | |
tree | e8f0320d8665de4765adec6d7568f4cf62bc65d8 /fs/resctrl/internal.h | |
parent | bd85310efd71b9e7809e1b95fe7a60fde42e62db (diff) | |
download | linux-aab2c5088cdb26e80d51ffbe72d24ab23fa1533e.tar.xz |
fs/resctrl: Add the functionality to unassign MBM events
The "mbm_event" counter assignment mode offers "num_mbm_cntrs" number of
counters that can be assigned to RMID, event pairs and monitor bandwidth usage
as long as it is assigned. If all the counters are in use, the kernel logs the
error message "Failed to allocate counter for <event> in domain <id>" in
/sys/fs/resctrl/info/last_cmd_status when a new assignment is requested.
To make space for a new assignment, users must unassign an already assigned
counter and retry the assignment again.
Add the functionality to unassign and free the counters in the domain. Also,
add the helper rdtgroup_unassign_cntrs() to unassign counters in the group.
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/internal.h')
-rw-r--r-- | fs/resctrl/internal.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/resctrl/internal.h b/fs/resctrl/internal.h index 762705d7eb8d..c6b66d4a6a37 100644 --- a/fs/resctrl/internal.h +++ b/fs/resctrl/internal.h @@ -398,6 +398,8 @@ int resctrl_available_mbm_cntrs_show(struct kernfs_open_file *of, struct seq_fil void rdtgroup_assign_cntrs(struct rdtgroup *rdtgrp); +void rdtgroup_unassign_cntrs(struct rdtgroup *rdtgrp); + #ifdef CONFIG_RESCTRL_FS_PSEUDO_LOCK int rdtgroup_locksetup_enter(struct rdtgroup *rdtgrp); |