[PATCH v6 0/6] fs/resctrl: Fix some resctl bugs related to mpam

From: Jinjie Ruan

Date: Thu Nov 19 2026 - 04:51:08 EST


Fix resctrl RMID allocation to report a retryable -EBUSY only when
the target CLOSID actually has RMIDs in limbo.

Split the domain-offline path out so it releases busy RMIDs without
allocating a monitor context it never uses.

Also unmount resctrl with the CDP state it was mounted with to fix
another bug with mpam cdp.

And do not allow monitor group move when the RMID index changes.

These fixes are split out of the v10 Narrow-PARTID series below.
https://lore.kernel.org/all/20261020134239.3921377-1-ruanjinjie@xxxxxxxxxx/

v5 RESEND -> v6:
- Drop the moveable_mon_group interface to be discussed widely.
- Updated variable and function name, commit message, comments (Reinette).
- Remove cdp hook and instead check whether all resource CDPs are
enabled and add a comment (Reinette, Ben).
- Add reviewed-by.
- v5 RESEND: https://lore.kernel.org/all/20261110133938.3768632-1-ruanjinjie@xxxxxxxxxx/

v5 -> v5 RESEND:
- resend because of email problem.

Changes in v5:
- Update and split the patch as Reinette and Ben suggested.
- Adjust the commit message.
- Add Reviewed-by.
- Link to v4:
- https://lore.kernel.org/all/20261105070934.2258613-1-ruanjinjie@xxxxxxxxxx/
- https://lore.kernel.org/all/20261105123524.2282090-1-ruanjinjie@xxxxxxxxxx/

Changes in v4:
- Fix the unmount resctrl bug as Reinette suggested.
- Adjust the commit message.
- Add Reviewed-bys.
- Link to v3:
- https://lore.kernel.org/all/20261031063634.1678345-1-ruanjinjie@xxxxxxxxxx/
- https://lore.kernel.org/all/20261031094616.1691026-1-ruanjinjie@xxxxxxxxxx/

Jinjie Ruan (5):
fs/resctrl: Report a temporary RMID shortage per CLOSID
fs/resctrl: Do not allocate a monitor context when releasing limbo
RMIDs
fs/resctrl: Clear the CDP state after the cleanup
fs/resctrl: Stop the limbo handler while resctrl is unmounted
fs/resctrl: Release the limbo RMIDs when the CDP state changes

Peter Newman (1):
fs/resctrl: Disallow monitor group move when the RMID index changes

Documentation/filesystems/resctrl.rst | 8 +-
fs/resctrl/internal.h | 4 +-
fs/resctrl/monitor.c | 160 +++++++++++++++++++++-----
fs/resctrl/rdtgroup.c | 27 ++++-
4 files changed, 160 insertions(+), 39 deletions(-)

--
2.34.1