From: "tip-bot2 for Babu Moger" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Babu Moger <babu.moger@amd.com>,
"Borislav Petkov (AMD)" <bp@alien8.de>,
Reinette Chatre <reinette.chatre@intel.com>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: x86/cache] fs/resctrl: Fix counter auto-assignment on mkdir with mbm_event enabled
Date: Wed, 17 Sep 2025 09:38:48 -0000 [thread overview]
Message-ID: <175810192896.709179.16893129735281399809.tip-bot2@tip-bot2> (raw)
In-Reply-To: <9788ef37c17a9559a08019b694d2a47b507aa4ac.1758043391.git.babu.moger@amd.com>
The following commit has been merged into the x86/cache branch of tip:
Commit-ID: dd86b69d20fb9fa7e941ed01ff05f1e662fcc3ff
Gitweb: https://git.kernel.org/tip/dd86b69d20fb9fa7e941ed01ff05f1e662fcc3ff
Author: Babu Moger <babu.moger@amd.com>
AuthorDate: Tue, 16 Sep 2025 12:25:49 -05:00
Committer: Borislav Petkov (AMD) <bp@alien8.de>
CommitterDate: Wed, 17 Sep 2025 11:31:12 +02:00
fs/resctrl: Fix counter auto-assignment on mkdir with mbm_event enabled
rdt_resource::resctrl_mon::mbm_assign_on_mkdir determines if a counter will
automatically be assigned to an RMID, MBM event pair when its associated
monitor group is created via mkdir.
Testing shows that counters are always automatically assigned to new monitor
groups, whether mbm_assign_on_mkdir is set or not.
To support automatic counter assignment the check for mbm_assign_on_mkdir
should be in rdtgroup_assign_cntrs() that assigns counters during monitor
group creation. Instead, the check for mbm_assign_on_mkdir is in
rdtgroup_unassign_cntrs() that is called on monitor group deletion from where
counters should always be unassigned, whether mbm_assign_on_mkdir is set or
not.
Fix automatic counter assignment by moving the mbm_assign_on_mkdir check from
rdtgroup_unassign_cntrs() to rdtgroup_assign_cntrs().
[ bp: Replace commit message with Reinette's version. ]
Fixes: ef712fe97ec57 ("fs/resctrl: Auto assign counters on mkdir and clean up on group removal")
Signed-off-by: Babu Moger <babu.moger@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Acked-by: Reinette Chatre <reinette.chatre@intel.com>
---
fs/resctrl/monitor.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/resctrl/monitor.c b/fs/resctrl/monitor.c
index 50c2446..4076336 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))
prev parent reply other threads:[~2025-09-17 9:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-16 17:25 [PATCH] " Babu Moger
2025-09-16 21:58 ` Reinette Chatre
2025-09-16 22:46 ` Moger, Babu
2025-09-17 9:26 ` Borislav Petkov
2025-09-18 0:42 ` Moger, Babu
2025-09-17 9:38 ` tip-bot2 for Babu Moger [this message]
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=175810192896.709179.16893129735281399809.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=babu.moger@amd.com \
--cc=bp@alien8.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=reinette.chatre@intel.com \
--cc=x86@kernel.org \
/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
all inboxes | Powered by JetHome®