From: Reinette Chatre <reinette.chatre@intel.com>
To: Babu Moger <babu.moger@amd.com>, <tony.luck@intel.com>,
<Dave.Martin@arm.com>, <james.morse@arm.com>, <bp@alien8.de>
Cc: <x86@kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] fs/resctrl: Fix counter auto-assignment on mkdir with mbm_event enabled
Date: Tue, 16 Sep 2025 14:58:33 -0700 [thread overview]
Message-ID: <437d6c22-f232-48a0-94db-a395aabe85d5@intel.com> (raw)
In-Reply-To: <9788ef37c17a9559a08019b694d2a47b507aa4ac.1758043391.git.babu.moger@amd.com>
Hi Babu,
On 9/16/25 10:25 AM, Babu Moger wrote:
> Found that the automatic counter assignment is not working as expected when
> "mbm_event" is enabled. Counters are being assigned regardless of whether
> mbm_assign_on_mkdir is enabled or not.
>
> The logic was mistakenly placed in rdtgroup_unassign_cntrs() instead of
> rdtgroup_assign_cntrs().
>
> Fix it by moving the code snippet to rdtgroup_assign_cntrs().
>
With the goal to address Boris's concerns about changelogs I think the changelog
can be made more specific by replacing the vague "the logic" and "the code snippet"
terms. Below is an example changelog that addresses this but I am afraid that it may
now be considered too much text :(. As I am still learning how to get this right I
surely will not hold up the patch because of this, tag is below.
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().
> Fixes: ef712fe97ec57 ("fs/resctrl: Auto assign counters on mkdir and clean up on group removal")
> Signed-off-by: Babu Moger <babu.moger@amd.com>
> ---
Thank you very much for catching and fixing this issue.
It is not clear to me if the changelog will be acceptable and I provided alternative
text just in case. The fix looks good to me, for that:
Acked-by: Reinette Chatre <reinette.chatre@intel.com>
Reinette
next prev parent reply other threads:[~2025-09-16 21:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-16 17:25 [PATCH] fs/resctrl: Fix counter auto-assignment on mkdir with mbm_event enabled Babu Moger
2025-09-16 21:58 ` Reinette Chatre [this message]
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: x86/cache] " tip-bot2 for Babu Moger
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=437d6c22-f232-48a0-94db-a395aabe85d5@intel.com \
--to=reinette.chatre@intel.com \
--cc=Dave.Martin@arm.com \
--cc=babu.moger@amd.com \
--cc=bp@alien8.de \
--cc=james.morse@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tony.luck@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