mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Zeng Heng <zengheng4@huawei.com>
To: Ben Horgan <ben.horgan@arm.com>, <james.morse@arm.com>,
	<Dave.Martin@arm.com>, <reinette.chatre@intel.com>,
	<fenghuay@nvidia.com>
Cc: <dave.hansen@linux.intel.com>, <tglx@kernel.org>,
	<mingo@redhat.com>, <hpa@zytor.com>, <bp@alien8.de>,
	<tony.luck@intel.com>, <babu.moger@amd.com>, <x86@kernel.org>,
	<linux-kernel@vger.kernel.org>, <wangkefeng.wang@huawei.com>
Subject: Re: [PATCH v3 1/9] fs/resctrl: Fix MPAM Partid parsing errors by preserving CDP state during umount
Date: Sat, 21 Mar 2026 14:39:35 +0800	[thread overview]
Message-ID: <dc7c4cca-c8b3-2711-fd12-0b3fd7b894ad@huawei.com> (raw)
In-Reply-To: <ee928748-5b44-115a-b468-8662744bcb30@huawei.com>



On 2026/3/21 12:11, Zeng Heng wrote:
> Hi Ben,
> 
> On 2026/3/21 1:07, Ben Horgan wrote:
>> Hi Zeng,
>>
>> On 3/17/26 13:21, Zeng Heng wrote:
>>> This patch fixes a pre-existing issue in the resctrl filesystem teardown
>>> sequence where premature clearing of cdp_enabled could lead to MPAM 
>>> Partid
>>> parsing errors.
>>>
>>> The closid to partid conversion logic inherently depends on the global
>>> cdp_enabled state. However, rdt_disable_ctx() clears this flag early in
>>> the umount path, while free_rmid() operations will reference after that.
>>> This creates a window where partid parsing operates with inconsistent 
>>> CDP
>>> state, potentially make monitor reads with wrong partid mapping.
>>>
>>> Additionally, rmid_entry remaining in limbo between mount sessions may
>>> trigger potential partid out-of-range errors, leading to MPAM fault
>>> interrupts and subsequent MPAM disablement.
>>>
>>> Reorder rdt_kill_sb() to delay rdt_disable_ctx() until after
>>> rmdir_all_sub() and resctrl_fs_teardown() complete. This ensures
>>> all rmid-related operations finish with correct CDP state.
>>>
>>> Introduce rdt_flush_limbo() to flush and cancel limbo work before the
>>> filesystem teardown completes. An alternative approach would be to 
>>> cancel
>>
>> The code looks correct but it does introduce a subtle change of 
>> behaviour which
>> may or may not be acceptable. A busy rmid may now be allocated after 
>> remount.
>> Clean rmids were never guaranteed, e.g. when a domain goes offline, 
>> but this
>> weakens the guarantee.
> 
> Yes, this would indeed weaken MPAM's guarantee for clean RMIDs.
> 
> Hopefully, no one is doing this in production, repeatedly switching
> resctrl mount modes while monitoring workloads (which sounds more like
> testing to me), and still expecting strict guarantees of clean RMID
> allocation.
> 
>>
>>> limbo work on umount and restart it on remount with remaked bitmap.
>>> However, this would require substantial changes in the resctrl layer to
>>> handle CDP state transitions across mount sessions, which is beyond the
>>> scope of the reqpartid feature work this patchset focuses on. The 
>>> current
>>
>> Another option to consider is whether limbo could be replaced by 
>> checking whether
>> an rmid is busy at allocation.
>>
>> Do your changes here to resctrl_arch_rmid_idx_encode() have an impact 
>> on how
>> limbo works?
> 
> 
> In follow-up patches, resctrl_arch_rmid_idx_encode() also needs to
> depend on the CDP state because it needs to check out the intpartid and
> reqpartid. Between remount sessions, RMIDs residing in limbo also have a
> parsing error issue.
> 
> 

For this reason, had to make this patch as a prerequisite fix in the
patch series.


Best Regards,
Zeng Heng

  reply	other threads:[~2026-03-21  6:39 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-17 13:21 [PATCH v3 0/9] arm_mpam: Introduce Narrow-PARTID feature Zeng Heng
2026-03-17 13:21 ` [PATCH v3 1/9] fs/resctrl: Fix MPAM Partid parsing errors by preserving CDP state during umount Zeng Heng
2026-03-20 17:07   ` Ben Horgan
2026-03-21  4:11     ` Zeng Heng
2026-03-21  6:39       ` Zeng Heng [this message]
2026-03-17 13:21 ` [PATCH v3 2/9] arm_mpam: Add intPARTID and reqPARTID support for narrow PARTID feature Zeng Heng
2026-03-17 13:21 ` [PATCH v3 3/9] arm_mpam: Disable Narrow-PARTID when MBA lacks support Zeng Heng
2026-04-10  1:07   ` Shaopeng Tan (Fujitsu)
2026-04-11  6:50     ` Zeng Heng
2026-04-13  9:12       ` Zeng Heng
2026-03-17 13:21 ` [PATCH v3 4/9] arm_mpam: Refactor rmid to reqPARTID/PMG mapping Zeng Heng
2026-03-17 13:21 ` [PATCH v3 5/9] arm_mpam: Propagate control group config to sub-monitoring groups Zeng Heng
2026-03-17 13:21 ` [PATCH v3 6/9] fs/resctrl: Add rmid_entry state helpers Zeng Heng
2026-03-17 13:21 ` [PATCH v3 7/9] arm_mpam: Implement dynamic reqPARTID allocation for monitoring groups Zeng Heng
2026-03-17 13:21 ` [PATCH v3 8/9] fs/resctrl: Wire up rmid expansion and reclaim functions Zeng Heng
2026-03-17 13:21 ` [PATCH v3 9/9] arm64/mpam: Add mpam_sync_config() for dynamic rmid expansion Zeng Heng
2026-03-20 16:14 ` [PATCH v3 0/9] arm_mpam: Introduce Narrow-PARTID feature Ben Horgan
2026-03-21  7:18   ` Zeng Heng
2026-04-10  0:13 ` Shaopeng Tan (Fujitsu)
2026-04-11  6:32   ` Zeng Heng
2026-04-16  6:11     ` Shaopeng Tan (Fujitsu)
2026-04-20  8:19       ` Zeng Heng

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=dc7c4cca-c8b3-2711-fd12-0b3fd7b894ad@huawei.com \
    --to=zengheng4@huawei.com \
    --cc=Dave.Martin@arm.com \
    --cc=babu.moger@amd.com \
    --cc=ben.horgan@arm.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=fenghuay@nvidia.com \
    --cc=hpa@zytor.com \
    --cc=james.morse@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=reinette.chatre@intel.com \
    --cc=tglx@kernel.org \
    --cc=tony.luck@intel.com \
    --cc=wangkefeng.wang@huawei.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®