Re: [PATCH v3 2/2] fs/resctrl: Do not allocate a monitor context when releasing limbo RMIDs

From: Reinette Chatre

Date: Mon Nov 02 2026 - 18:07:07 EST


Hi Jinjie,

On 10/30/26 11:36 PM, 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().

Same comment as v2: could you please adjust the line wraps to not jump around
as much?

> Fixes: e557999f80a5 ("x86/resctrl: Allow arch to allocate memory needed in resctrl_arch_rmid_read()")
> Signed-off-by: Jinjie Ruan <ruanjinjie@xxxxxxxxxx>
> Cc: James Morse <james.morse@xxxxxxx>
> Cc: Reinette Chatre <reinette.chatre@xxxxxxxxx>
> Cc: <stable@xxxxxxxxxxxxxxx> # 7.1.x
> ---

Thank you.

With changelog line wrap change:
| Reviewed-by: Reinette Chatre <reinette.chatre@xxxxxxxxx>

Reinette