From: Jinjie Ruan <ruanjinjie@huawei.com>
To: Reinette Chatre <reinette.chatre@intel.com>,
Ben Horgan <ben.horgan@arm.com>, <tony.luck@intel.com>,
<Dave.Martin@arm.com>, <james.morse@arm.com>,
<babu.moger@amd.com>, <tglx@kernel.org>, <mingo@redhat.com>,
<bp@alien8.de>, <dave.hansen@linux.intel.com>, <hpa@zytor.com>,
<fenghuay@nvidia.com>, <tan.shaopeng@fujitsu.com>,
<zengheng4@huawei.com>, <jic23@kernel.org>, <gshan@redhat.com>,
<catalin.marinas@arm.com>, <x86@kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v10 RESEND 02/15] fs/resctrl: Skip monitor context allocation when force-freeing RMIDs
Date: Thu, 29 Oct 2026 12:05:03 +0800 [thread overview]
Message-ID: <2c09e753-728d-46a0-932a-3c31f72333c6@huawei.com> (raw)
In-Reply-To: <7bf71a63-fb7d-491a-ae27-b5b72c7a0edc@intel.com>
Hi Reinette,
在 2026/10/29 5:29, Reinette Chatre 写道:
> Hi Jinjie,
>
> On 10/26/26 6:33 PM, Jinjie Ruan wrote:
>>
>>
>> 在 2026/10/26 22:11, Ben Horgan 写道:
>>> Hi Jinjie,
>>>
>>> On 26/10/2026 14:08, Ben Horgan wrote:
>>>> Hi Jinjie,
>>>>
>>>> On 20/10/2026 14:42, Jinjie Ruan wrote:
>>>>> __check_limbo() allocates the architecture monitor context before the
>>>>> scan loop, even when force_free is set. The force-free path never reads
>>>>> occupancy and never uses the context.
>>>>>
>>>>> If the allocation fails, the function returns early and leaves the limbo
>>>>> list unflushed. Callers such as the unmount path then silently fail to
>>>>> return the RMIDs to the free list, leaving stale CLOSIDs in limbo that
>>>>> are re-interpreted with the CDP state of the next mount.
>>>>
>>>> Is this a theoretical fix or is there some way that resctrl_arch_mon_ctx_alloc() can fail in practice?
>>>
>>> This does seem a good change to me and we do have to consider that the memory alocation might fail.
>>
>> Hi Ben,
>>
>> I agree. force_free=true not rely on the allocation of arch_mon_ctx
>> succeeding, we should directly loop to free the RMID.
>>
>> Perhaps a small refactor is needed to split __check_limbo() into two
>> versions as there isn't much duplication?
> I agree that a split would look better here. With these additional checks of
> force_free the __check_limbo() is becoming hard to follow. Even more than
I agree.
> two versions of __check_limbo() this could just be two distinct functions,
> for example a new "void release_limbo_rmids(struct rdt_l3_mon_domain *d)"
> that is only called from resctrl_offline_l3_mon_domain().
Thank you! will adopt this naming.
>
> The changelog mentions the unmount path but it seems that the issue is with
> domains going offline instead? As far as I understand the limbo state is not
> impacted by mount/unmount.
You're right, I misunderstood — it's when the domain goes offline.
>
> I also think that the "Fixes:" tag should instead be:
> fc16126cc11d ("x86,fs/resctrl: Prevent out-of-bounds access while offlining CPU when SNC enabled")
Thank you! I got it.
>
> The first two fixes in this series look appropriate for resctrl fs. I'd like
> to echo Ben's request to submit them separately from this work.
Thank you! I will send it separately shortly.
>
> Thank you very much.
>
> Reinette
--
Best regards,
Jinjie
next prev parent reply other threads:[~2026-10-29 4:05 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-20 13:42 [PATCH v10 RESEND 00/15] arm_mpam: Introduce Narrow-PARTID feature Jinjie Ruan
2026-10-20 13:42 ` [PATCH v10 RESEND 01/15] fs/resctrl: Return -EBUSY when per-CLOSID RMIDs are in limbo Jinjie Ruan
2026-10-26 14:05 ` Ben Horgan
2026-10-28 21:28 ` Reinette Chatre
2026-10-29 3:51 ` Jinjie Ruan
2026-10-20 13:42 ` [PATCH v10 RESEND 02/15] fs/resctrl: Skip monitor context allocation when force-freeing RMIDs Jinjie Ruan
2026-10-26 14:08 ` Ben Horgan
2026-10-26 14:11 ` Ben Horgan
2026-10-27 1:33 ` Jinjie Ruan
2026-10-28 21:29 ` Reinette Chatre
2026-10-29 4:05 ` Jinjie Ruan [this message]
2026-10-20 13:42 ` [PATCH v10 RESEND 03/15] arm_mpam: Fix error return in resctrl_arch_mon_ctx_alloc() Jinjie Ruan
2026-10-26 14:40 ` Ben Horgan
2026-10-27 1:25 ` Jinjie Ruan
2026-10-20 13:42 ` [PATCH v10 RESEND 04/15] arm_mpam: Fix infinite PARTID reset loop when 65536 PARTIDs are supported Jinjie Ruan
2026-10-20 13:42 ` [PATCH v10 RESEND 05/15] arm_mpam: Don't stall MPAM enable when an MSC fails to probe Jinjie Ruan
2026-10-26 14:49 ` Ben Horgan
2026-10-27 1:47 ` Jinjie Ruan
2026-10-20 13:42 ` [PATCH v10 RESEND 06/15] fs/resctrl: Unmount resctrl with the CDP state it was mounted with Jinjie Ruan
2026-10-26 15:08 ` Ben Horgan
2026-10-20 13:42 ` [PATCH v10 RESEND 07/15] fs/resctrl: Add resctrl_arch_rmid_idx_match() helper Jinjie Ruan
2026-10-20 13:42 ` [PATCH v10 RESEND 08/15] arm_mpam: resctrl: Add resctrl_closid_rmid_to_partid_pmg() helper Jinjie Ruan
2026-10-20 13:42 ` [PATCH v10 RESEND 09/15] arm_mpam: Add a helper to check a PARTID is in a CLOSID Jinjie Ruan
2026-10-20 13:42 ` [PATCH v10 RESEND 10/15] arm_mpam: Track the PARTID and internal PARTID limits per class Jinjie Ruan
2026-10-20 13:42 ` [PATCH v10 RESEND 11/15] arm_mpam: Divide the PARTIDs between the control groups Jinjie Ruan
2026-10-20 13:42 ` [PATCH v10 RESEND 12/15] arm_mpam: Map resctrl RMIDs onto the request PARTIDs Jinjie Ruan
2026-10-20 13:42 ` [PATCH v10 RESEND 13/15] arm_mpam: Identify the non-aliasing controls Jinjie Ruan
2026-10-20 13:42 ` [PATCH v10 RESEND 14/15] arm_mpam: Use the request PARTIDs beyond the internal range Jinjie Ruan
2026-10-20 13:42 ` [PATCH v10 RESEND 15/15] arm_mpam: resctrl: Add kunit tests for narrow PARTID helpers Jinjie Ruan
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=2c09e753-728d-46a0-932a-3c31f72333c6@huawei.com \
--to=ruanjinjie@huawei.com \
--cc=Dave.Martin@arm.com \
--cc=babu.moger@amd.com \
--cc=ben.horgan@arm.com \
--cc=bp@alien8.de \
--cc=catalin.marinas@arm.com \
--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-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=reinette.chatre@intel.com \
--cc=tan.shaopeng@fujitsu.com \
--cc=tglx@kernel.org \
--cc=tony.luck@intel.com \
--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
all inboxes | Powered by JetHome®