Re: [RESEND PATCH v4 03/15] x86/resctrl: Add data structures and definitions for PLZA configuration

Reinette Chatre <[email protected]>
Newsgroups org.kernel.vger.linux-doc,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
Hi Babu,

On 8/11/26 2:10 PM, Babu Moger wrote:
> On 8/10/26 21:58, Reinette Chatre wrote:
>> On 7/7/26 2:50 PM, Babu Moger wrote:
>>> Privilege Level Zero Association (PLZA) allows the kernel to use a
>>> different CLOSID (and optionally RMID) than user mode on entry to kernel
>>> mode. The CLOSID/RMID association is programmed per CPU via
>>
>> CLOSID is also optional, no? I am not able to recall now why this is not made
>> optional in this implementation though. Could you please remind me and add
>> it to the changelog for next time?
> 
> 
> Yes, CLOSID is optional as well. Since PLZA was primarily focused on
> allocation, I hadn't considered that use case initially. However,
> there may be scenarios where a user wants to monitor kernel activity
> without affecting or changing the existing allocation configuration.
> That would introduce an additional operating mode(See below).

ok.

I think doing so will simplify supporting the different modes across systems
that may not support allocation or monitoring. 
> INHERIT_CTRL_AND_MON:
> Kernel work inherits the allocation and monitoring from the user space
> task. On x86 this means that kernel work shares the same CLOSID and
> RMID as the user space task. This matches today's resctrl behavior.
> 
> GLOBAL_ASSIGN_CTRL_INHERIT_MON_PER_CPU:
> Kernel work uses a globally assigned allocation while monitoring is
> inherited from the user space task. On x86 this means a CLOSID is
> assigned for kernel work and the RMID is inherited from the user space
> task. Default scope is all online CPUs; a subset may be selected via
> the resctrl group interface. A CTRL_MON group is bound to this mode.
> 
> GLOBAL_ASSIGN_CTRL_ASSIGN_MON_PER_CPU:
> Kernel work uses globally assigned allocation and monitoring. On x86
> this means both CLOSID and RMID are assigned for kernel work. Default
> scope is all online CPUs; a subset may be selected via the resctrl
> group interface. A CTRL_MON or MON group is bound to this mode.
> 
> GLOBAL_INHERIT_CTRL_ASSIGN_MON_PER_CPU:   <--- New mode
> Kernel work inherits the allocation from user task and monitoring is
> globally assigned for kernel work. On x86 this means that kernel
> work shares the same CLOSID as user task and kernel work user
> globally assigned RMID. A MON group is bound to this mode.

I provided comments about this text in following patch. Apart from that,
I think a CTRL_MON or MON group could be assigned to this mode? 

Thank you.

Reinette
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.