Re: [PATCH v2 00/16] fs,x86/resctrl: Add kernel-mode (e.g., PLZA) support to the resctrl subsystem

Luck, Tony
2026-04-21T00:03:26Z

> The system boots with these default settings:
>
> # cat info/kernel_mode
> [inherit_ctrl_and_mon]
> global_assign_ctrl_assign_mon_per_cpu
> global_assign_ctrl_inherit_mon_per_cpu
>
>
> At this point, the interface info/kernel_mode_assignment is not visible.
>
> Next, lets create a new control group:
>
> # mkdir ctrl1

This allocates a CLOSID and an RMID for this group.

> We want to designate this group as the new kernel-mode group.
>
> First operation: Change the mode:
>
> # echo "global_assign_ctrl_inherit_mon_per_cpu" > info/kernel_mode

This mode needs a CLOSID for PLZA, but doesn't need an RMID.

> At this stage, only the kernel mode is being changed. However, there is no
> way to know which control group the user intends to assign to kernel mode.
> All we know here is the selected mode.
>
> After this operation, the info/kernel_mode_assignment interface should
> become visible. But the question is: what should it contain or point to at
> this moment?
>
> # cat info/kernel_mode_assignment
> ??
>
> Next operation: Assign the group
>
> # echo "ctrl1//" > info/kernel_mode_assignment

Now ring0 code is using the CLOSID from the ctrl1 group.

But the RMID for this group isn't used.

Are we OK with "wasting" an RMID in this way?

Maybe it doesn't matter too much for AMD as you would just
avoid assigning any counters to this group. But should Intel
get around to doing PLZA-like functionality, that's a real
loss of an RMID that might be useful elsewhere.

-Tony