From: Ben Horgan <ben.horgan@arm.com>
To: Jinjie Ruan <ruanjinjie@huawei.com>,
tony.luck@intel.com, reinette.chatre@intel.com,
Dave.Martin@arm.com, james.morse@arm.com, babu.moger@amd.com,
corbet@lwn.net, skhan@linuxfoundation.org, rdunlap@infradead.org,
tglx@kernel.org, mingo@redhat.com, bp@alien8.de,
dave.hansen@linux.intel.com, hpa@zytor.com, fenghuay@nvidia.com,
tan.shaopeng@fujitsu.com, will@kernel.org, gshan@redhat.com,
zengheng4@huawei.com, jic23@kernel.org, x86@kernel.org,
linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v5 RESEND 2/7] fs/resctrl: Do not allocate a monitor context when releasing limbo RMIDs
Date: Thu, 12 Nov 2026 11:37:12 +0000 [thread overview]
Message-ID: <9e4852e4-0bcd-4cc2-8f80-367340fb4923@arm.com> (raw)
In-Reply-To: <20261110133938.3768632-3-ruanjinjie@huawei.com>
Hi Jinjie,
On 10/11/2026 13:39, Jinjie Ruan wrote:
> Busy RMIDs of a monitor domain are normally released by the limbo
> handler once their cache occupancy drops below the threshold. When a
> domain goes offline, its busy RMIDs are released without checking
> occupancy, since the domain is going away and the RMIDs would otherwise
> never return to the free list.
>
> On the monitor domain offline path, __check_limbo() allocates the
> monitor context that an occupancy check needs before it scans the busy
> RMIDs, but without using it, and returns early when that allocation
> fails. Then the caller destroys the domain's monitoring state, including
> the bitmap that records which RMIDs are busy, so nothing can clear those
> bits afterwards and the busy counts never reach zero. Those RMIDs never
> return to the free list and, where the RMID depends on the CLOSID, the
> dirty count of their CLOSID never decreases. The allocation can also
> wait for a monitor to become free, which stalls the CPU offline path on
> a context that is not going to be used.
>
> Only MPAM systems are affected. An architecture that can always read an
> RMID allocates nothing for the monitor context, so the allocation can
> neither fail nor wait there.
>
> Move the release of busy RMIDs into a separate function that does not
> take a monitor context and leave the occupancy check to __check_limbo().
>
> Fixes: e557999f80a5 ("x86/resctrl: Allow arch to allocate memory needed in resctrl_arch_rmid_read()")
> Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
> Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
> Cc: James Morse <james.morse@arm.com>
> Cc: Reinette Chatre <reinette.chatre@intel.com>
> Cc: <stable@vger.kernel.org> # 7.1.x
Looks good to me.
Reviewed-by: Ben Horgan <ben.horgan@arm.com>
next prev parent reply other threads:[~2026-11-12 11:37 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-10 13:39 [PATCH v5 RESEND 0/7] fs/resctrl: Fix some resctl bugs related to mpam Jinjie Ruan
2026-11-10 13:39 ` [PATCH v5 RESEND 1/7] fs/resctrl: Report a temporary RMID shortage per CLOSID Jinjie Ruan
2026-11-10 13:39 ` [PATCH v5 RESEND 2/7] fs/resctrl: Do not allocate a monitor context when releasing limbo RMIDs Jinjie Ruan
2026-11-12 11:37 ` Ben Horgan [this message]
2026-11-10 13:39 ` [PATCH v5 RESEND 3/7] fs/resctrl: Clear the CDP state after the cleanup Jinjie Ruan
2026-11-11 18:27 ` Reinette Chatre
2026-11-12 1:44 ` Jinjie Ruan
2026-11-10 13:39 ` [PATCH v5 RESEND 4/7] fs/resctrl: Stop the limbo handler while resctrl is unmounted Jinjie Ruan
2026-11-11 18:26 ` Reinette Chatre
2026-11-10 13:39 ` [PATCH v5 RESEND 5/7] fs/resctrl: Release the limbo RMIDs when the CDP state changes Jinjie Ruan
2026-11-11 18:33 ` Reinette Chatre
2026-11-10 13:39 ` [PATCH v5 RESEND 6/7] fs/resctrl: Disallow monitor group move when the RMID index changes Jinjie Ruan
2026-11-11 18:33 ` Reinette Chatre
2026-11-10 13:39 ` [PATCH v5 RESEND 7/7] fs/resctrl: Add info/moveable_mon_group Jinjie Ruan
2026-11-11 18:34 ` Reinette Chatre
2026-11-12 1:42 ` Jinjie Ruan
2026-11-12 17:16 ` Ben Horgan
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=9e4852e4-0bcd-4cc2-8f80-367340fb4923@arm.com \
--to=ben.horgan@arm.com \
--cc=Dave.Martin@arm.com \
--cc=babu.moger@amd.com \
--cc=bp@alien8.de \
--cc=corbet@lwn.net \
--cc=dave.hansen@linux.intel.com \
--cc=fenghuay@nvidia.com \
--cc=gshan@redhat.com \
--cc=hpa@zytor.com \
--cc=james.morse@arm.com \
--cc=jic23@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rdunlap@infradead.org \
--cc=reinette.chatre@intel.com \
--cc=ruanjinjie@huawei.com \
--cc=skhan@linuxfoundation.org \
--cc=tan.shaopeng@fujitsu.com \
--cc=tglx@kernel.org \
--cc=tony.luck@intel.com \
--cc=will@kernel.org \
--cc=x86@kernel.org \
--cc=zengheng4@huawei.com \
/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