Re: [PATCH v18 00/33] x86,fs/resctrl: Support AMD Assignable Bandwidth Monitoring Counters (ABMC)
From: Moger, Babu
Date: Tue Sep 16 2025 - 13:03:20 EST
Hi Boris/Reinette,
On 9/15/25 16:07, Reinette Chatre wrote:
> Hi Boris,
>
> On 9/15/25 4:25 AM, Borislav Petkov wrote:
>> On Fri, Sep 05, 2025 at 04:33:59PM -0500, Babu Moger wrote:
>>> .../admin-guide/kernel-parameters.txt | 2 +-
>>> Documentation/filesystems/resctrl.rst | 325 ++++++
>>> MAINTAINERS | 1 +
>>> arch/x86/include/asm/cpufeatures.h | 1 +
>>> arch/x86/include/asm/msr-index.h | 2 +
>>> arch/x86/include/asm/resctrl.h | 16 -
>>> arch/x86/kernel/cpu/resctrl/core.c | 81 +-
>>> arch/x86/kernel/cpu/resctrl/internal.h | 56 +-
>>> arch/x86/kernel/cpu/resctrl/monitor.c | 248 +++-
>>> arch/x86/kernel/cpu/scattered.c | 1 +
>>> fs/resctrl/ctrlmondata.c | 26 +-
>>> fs/resctrl/internal.h | 58 +-
>>> fs/resctrl/monitor.c | 1008 ++++++++++++++++-
>>> fs/resctrl/rdtgroup.c | 252 ++++-
>>> include/linux/resctrl.h | 148 ++-
>>> include/linux/resctrl_types.h | 18 +-
>>> 16 files changed, 2019 insertions(+), 224 deletions(-)
>>
>> Ok, I've rebased and pushed out the pile into tip:x86/cache.
>>
>> Please run it one more time to make sure all is good.
>
> Thank you very much.
>
> I successfully completed as much testing as I can do without the hardware that has
> the feature. Will leave the actual feature sanity check to Babu.
I’ve completed the overnight test runs, and everything is working as expected.
However, I discovered an issue with automatic counter assignment that I
introduced during the v17 → v18 rebase. This is my bad. The automatic
merge mistakenly placed the code snippet in rdtgroup_unassign_cntrs()
instead of under mbm_assign_on_mkdir.
Here is the patch snippet. Will send the fix patch separately.
diff --git a/fs/resctrl/monitor.c b/fs/resctrl/monitor.c
index 50c24460d992..4076336fbba6 100644
--- a/fs/resctrl/monitor.c
+++ b/fs/resctrl/monitor.c
@@ -1200,7 +1200,8 @@ void rdtgroup_assign_cntrs(struct rdtgroup *rdtgrp)
{
struct rdt_resource *r = resctrl_arch_get_resource(RDT_RESOURCE_L3);
- if (!r->mon_capable || !resctrl_arch_mbm_cntr_assign_enabled(r))
+ if (!r->mon_capable || !resctrl_arch_mbm_cntr_assign_enabled(r) ||
+ !r->mon.mbm_assign_on_mkdir)
return;
if (resctrl_is_mon_event_enabled(QOS_L3_MBM_TOTAL_EVENT_ID))
@@ -1258,8 +1259,7 @@ void rdtgroup_unassign_cntrs(struct rdtgroup *rdtgrp)
{
struct rdt_resource *r = resctrl_arch_get_resource(RDT_RESOURCE_L3);
- if (!r->mon_capable || !resctrl_arch_mbm_cntr_assign_enabled(r) ||
- !r->mon.mbm_assign_on_mkdir)
+ if (!r->mon_capable || !resctrl_arch_mbm_cntr_assign_enabled(r))
return;
if (resctrl_is_mon_event_enabled(QOS_L3_MBM_TOTAL_EVENT_ID))
--
2.34.1
--
Thanks
Babu Moger