From: Ben Horgan <ben.horgan@arm.com>
To: "Luck, Tony" <tony.luck@intel.com>,
Reinette Chatre <reinette.chatre@intel.com>
Cc: "Moger, Babu" <bmoger@amd.com>,
"Moger, Babu" <Babu.Moger@amd.com>,
Drew Fustini <fustini@kernel.org>,
"corbet@lwn.net" <corbet@lwn.net>,
"Dave.Martin@arm.com" <Dave.Martin@arm.com>,
"james.morse@arm.com" <james.morse@arm.com>,
"tglx@kernel.org" <tglx@kernel.org>,
"mingo@redhat.com" <mingo@redhat.com>,
"bp@alien8.de" <bp@alien8.de>,
"dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>,
"x86@kernel.org" <x86@kernel.org>,
"hpa@zytor.com" <hpa@zytor.com>,
"peterz@infradead.org" <peterz@infradead.org>,
"juri.lelli@redhat.com" <juri.lelli@redhat.com>,
"vincent.guittot@linaro.org" <vincent.guittot@linaro.org>,
"dietmar.eggemann@arm.com" <dietmar.eggemann@arm.com>,
"rostedt@goodmis.org" <rostedt@goodmis.org>,
"bsegall@google.com" <bsegall@google.com>,
"mgorman@suse.de" <mgorman@suse.de>,
"vschneid@redhat.com" <vschneid@redhat.com>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"pawan.kumar.gupta@linux.intel.com"
<pawan.kumar.gupta@linux.intel.com>,
"pmladek@suse.com" <pmladek@suse.com>,
"feng.tang@linux.alibaba.com" <feng.tang@linux.alibaba.com>,
"kees@kernel.org" <kees@kernel.org>,
"arnd@arndb.de" <arnd@arndb.de>,
"fvdl@google.com" <fvdl@google.com>,
"lirongqing@baidu.com" <lirongqing@baidu.com>,
"bhelgaas@google.com" <bhelgaas@google.com>,
"seanjc@google.com" <seanjc@google.com>,
"xin@zytor.com" <xin@zytor.com>,
"Shukla, Manali" <Manali.Shukla@amd.com>,
"dapeng1.mi@linux.intel.com" <dapeng1.mi@linux.intel.com>,
"chang.seok.bae@intel.com" <chang.seok.bae@intel.com>,
"Limonciello, Mario" <Mario.Limonciello@amd.com>,
"naveen@kernel.org" <naveen@kernel.org>,
"elena.reshetova@intel.com" <elena.reshetova@intel.com>,
"Lendacky, Thomas" <Thomas.Lendacky@amd.com>,
"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"peternewman@google.com" <peternewman@google.com>,
"eranian@google.com" <eranian@google.com>,
"Shenoy, Gautham Ranjal" <gautham.shenoy@amd.com>
Subject: Re: [RFC PATCH 13/19] x86/resctrl: Add PLZA state tracking and context switch handling
Date: Thu, 19 Feb 2026 17:33:18 +0000 [thread overview]
Message-ID: <feaa16a5-765c-4c24-9e0b-c1f4ef87a66f@arm.com> (raw)
In-Reply-To: <aZXsihgl0B-o1DI6@agluck-desk3>
Hi Tony,
On 2/18/26 16:44, Luck, Tony wrote:
> On Tue, Feb 17, 2026 at 03:55:44PM -0800, Reinette Chatre wrote:
>> Hi Tony,
>>
>> On 2/17/26 2:52 PM, Luck, Tony wrote:
>>> On Tue, Feb 17, 2026 at 02:37:49PM -0800, Reinette Chatre wrote:
>>>> Hi Tony,
>>>>
>>>> On 2/17/26 1:44 PM, Luck, Tony wrote:
>>>>>>>>> I'm not sure if this would happen in the real world or not.
>>>>>>>>
>>>>>>>> Ack. I would like to echo Tony's request for feedback from resctrl users
>>>>>>>> https://lore.kernel.org/lkml/aYzcpuG0PfUaTdqt@agluck-desk3/
>>>>>>>
>>>>>>> Indeed. This is all getting a bit complicated.
>>>>>>>
>>>>>>
>>>>>> ack
>>>>>
>>>>> We have several proposals so far:
>>>>>
>>>>> 1) Ben's suggestion to use the default group (either with a Babu-style
>>>>> "plza" file just in that group, or a configuration file under "info/").
>>>>>
>>>>> This is easily the simplest for implementation, but has no flexibility.
>>>>> Also requires users to move all the non-critical workloads out to other
>>>>> CTRL_MON groups. Doesn't steal a CLOSID/RMID.
>>>>>
>>>>> 2) My thoughts are for a separate group that is only used to configure
>>>>> the schemata. This does allocate a dedicated CLOSID/RMID pair. Those
>>>>> are used for all tasks when in kernel mode.
>>>>>
>>>>> No context switch overhead. Has some flexibility.
>>>>>
>>>>> 3) Babu's RFC patch. Designates an existing CTRL_MON group as the one
>>>>> that defines kernel CLOSID/RMID. Tasks and CPUs can be assigned to this
>>>>> group in addition to belonging to another group than defines schemata
>>>>> resources when running in non-kernel mode.
>>>>> Tasks aren't required to be in the kernel group, in which case they
>>>>> keep the same CLOSID in both user and kernel mode. When used in this
>>>>> way there will be context switch overhead when changing between tasks
>>>>> with different kernel CLOSID/RMID.
>>>>>
>>>>> 4) Even more complex scenarios with more than one user configurable
>>>>> kernel group to give more options on resources available in the kernel.
>>>>>
>>>>>
>>>>> I had a quick pass as coding my option "2". My UI to designate the
>>>>> group to use for kernel mode is to reserve the name "kernel_group"
>>>>> when making CTRL_MON groups. Some tweaks to avoid creating the
>>>>> "tasks", "cpus", and "cpus_list" files (which might be done more
>>>>> elegantly), and "mon_groups" directory in this group.
>>>>
>>>> Should the decision of whether context switch overhead is acceptable
>>>> not be left up to the user?
>>>
>>> When someone comes up with a convincing use case to support one set of
>>> kernel resources when interrupting task A, and a different set of
>>> resources when interrupting task B, we should certainly listen.
>>
>> Absolutely. Someone can come up with such use case at any time tough. This
>> could be, and as has happened with some other resctrl interfaces, likely will be
>> after this feature has been supported for a few kernel versions. What timeline
>> should we give which users to share their use cases with us? Even if we do hear
>> from some users will that guarantee that no such use case will arise in the
>> future? Such predictions of usage are difficult for me and I thus find it simpler
>> to think of flexible ways to enable the features that we know the hardware supports.
>>
>> This does not mean that a full featured solution needs to be implemented from day 1.
>> If folks believe there are "no valid use cases" today resctrl still needs to prepare for
>> how it can grow to support full hardware capability and hardware designs in the
>> future.
>>
>> Also, please also consider not just resources for kernel work but also monitoring for
>> kernel work. I do think, for example, a reasonable use case may be to determine
>> how much memory bandwidth the kernel uses on behalf of certain tasks.
>>
>>>> I assume that, just like what is currently done for x86's MSR_IA32_PQR_ASSOC,
>>>> the needed registers will only be updated if there is a new CLOSID/RMID needed
>>>> for kernel space.
>>>
>>> Babu's RFC does this.
>>
>> Right.
>>
>>>
>>>> Are you suggesting that just this checking itself is too
>>>> expensive to justify giving user space more flexibility by fully enabling what
>>>> the hardware supports? If resctrl does draw such a line to not enable what
>>>> hardware supports it should be well justified.
>>>
>>> The check is likley light weight (as long as the variables to be
>>> compared reside in the same cache lines as the exisitng CLOSID
>>> and RMID checks). So if there is a use case for different resources
>>> when in kernel mode, then taking this path will be fine.
>>
>> Why limit this to knowing about a use case? As I understand this feature can be
>> supported in a flexible way without introducing additional context switch overhead
>> if the user prefers to use just one allocation for all kernel work. By being
>> configurable and allowing resctrl to support more use cases in the future resctrl
>> does not paint itself into a corner. This allows resctrl to grow support so that
>> the user can use all capabilities of the hardware with understanding that it will
>> increase context switch time.
>>
>> Reinette
>
> How about this idea for extensibility.
>
> Rename Babu's "plza" file to "plza_mode". Instead of just being an
> on/off switch, it may accept multiple possible requests.
If we're making global configuration choices then I think it should be
visible in a global location. It doesn't seem good to have to check all
CTRL_MON group.
>
> Humorous version:
>
> # echo "babu" > plza_mode
>
> This results in behavior of Babu's RFC. The CLOSID and RMID assigned to
> the CTRL_MON group are used when in kernel mode, but only for tasks that
> have their task-id written to the "tasks" file or for tasks in the
> default group in the "cpus" or "cpus_list" files are used to assign
> CPUs to this group.
>
> # echo "tony" > plza_mode
>
> All tasks run with the CLOSID/RMID for this group. The "tasks", "cpus" and
> "cpus_list" files and the "mon_groups" directory are removed.
>
> # echo "ben" > plza_mode"
>
> Only usable in the top-level default CTRL_MON directory. CLOSID=0/RMID=0
> are used for all tasks in kernel mode.
>
> # echo "stephane" > plza_mode
>
> The RMID for this group is freed. All tasks run in kernel mode with the
> CLOSID for this group, but use same RMID for both user and kernel.
> In addition to files removed in "tony" mode, the mon_data directory is
> removed.
For these option with a single group set as plza we could have a global
option and then just a plza marker.
>
> # echo "some-future-name" > plza_mode
>
> Somebody has a new use case. Resctrl can be extended by allowing some
> new mode.
>
> > Likely real implementation:
>
> Sub-components of each of the ideas above are encoded as a bitmask that
> is written to plza_mode. There is a file in the info/ directory listing
> which bits are supported on the current system (e.g. the "keep the same
> RMID" mode may be impractical on ARM, so it would not be listed as an
> option.)
>
> -Tony
Thanks,
Ben
next prev parent reply other threads:[~2026-02-19 17:33 UTC|newest]
Thread overview: 114+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-21 21:12 [RFC PATCH 00/19] x86,fs/resctrl: Support for Global Bandwidth Enforcement and Priviledge Level Zero Association Babu Moger
2026-01-21 21:12 ` [RFC PATCH 01/19] x86,fs/resctrl: Add support for Global Bandwidth Enforcement (GLBE) Babu Moger
2026-02-09 18:44 ` Reinette Chatre
2026-02-11 1:07 ` Moger, Babu
2026-02-11 16:54 ` Reinette Chatre
2026-02-11 21:18 ` Babu Moger
2026-02-12 3:51 ` Reinette Chatre
2026-02-12 19:09 ` Babu Moger
2026-02-13 0:05 ` Reinette Chatre
2026-02-13 1:51 ` Moger, Babu
2026-02-13 16:17 ` Reinette Chatre
2026-02-13 23:14 ` Moger, Babu
2026-02-14 0:01 ` Reinette Chatre
2026-02-16 16:05 ` Babu Moger
2026-02-20 10:07 ` Ben Horgan
2026-02-20 18:39 ` Reinette Chatre
2026-02-23 9:29 ` Ben Horgan
2026-02-21 0:12 ` Moger, Babu
2026-02-23 13:21 ` Fenghua Yu
2026-02-23 17:38 ` Reinette Chatre
2026-02-23 13:21 ` Fenghua Yu
2026-01-21 21:12 ` [RFC PATCH 02/19] x86,fs/resctrl: Add the resource for Global Memory Bandwidth Allocation Babu Moger
2026-01-21 21:12 ` [RFC PATCH 03/19] fs/resctrl: Add new interface max_bandwidth Babu Moger
2026-02-06 23:58 ` Reinette Chatre
2026-02-09 23:52 ` Moger, Babu
2026-01-21 21:12 ` [RFC PATCH 04/19] fs/resctrl: Add the documentation for Global Memory Bandwidth Allocation Babu Moger
2026-02-03 0:00 ` Luck, Tony
2026-02-03 16:38 ` Babu Moger
2026-02-09 16:32 ` Reinette Chatre
2026-02-10 19:44 ` Babu Moger
2026-01-21 21:12 ` [RFC PATCH 05/19] x86,fs/resctrl: Add support for Global Slow Memory Bandwidth Allocation (GSMBA) Babu Moger
2026-01-21 21:12 ` [RFC PATCH 06/19] x86,fs/resctrl: Add the resource for Global Slow Memory Bandwidth Enforcement(GLSBE) Babu Moger
2026-01-21 21:12 ` [RFC PATCH 07/19] fs/resctrl: Add the documentation for Global Slow Memory Bandwidth Allocation Babu Moger
2026-01-21 21:12 ` [RFC PATCH 08/19] x86/resctrl: Support Privilege-Level Zero Association (PLZA) Babu Moger
2026-01-21 21:12 ` [RFC PATCH 09/19] x86/resctrl: Add plza_capable in rdt_resource data structure Babu Moger
2026-02-11 15:19 ` Ben Horgan
2026-02-11 16:54 ` Reinette Chatre
2026-02-11 17:48 ` Ben Horgan
2026-02-13 15:50 ` Moger, Babu
2026-01-21 21:12 ` [RFC PATCH 10/19] fs/resctrl: Expose plza_capable via control info file Babu Moger
2026-01-21 21:12 ` [RFC PATCH 11/19] resctrl: Introduce PLZA static key enable/disable helpers Babu Moger
2026-01-21 21:12 ` [RFC PATCH 12/19] x86/resctrl: Add data structures and definitions for PLZA configuration Babu Moger
2026-01-21 21:12 ` [RFC PATCH 13/19] x86/resctrl: Add PLZA state tracking and context switch handling Babu Moger
2026-01-27 22:30 ` Luck, Tony
2026-01-28 16:01 ` Moger, Babu
2026-01-28 17:12 ` Luck, Tony
2026-01-28 17:41 ` Moger, Babu
2026-01-28 17:44 ` Moger, Babu
2026-01-28 19:17 ` Luck, Tony
2026-02-10 16:17 ` Reinette Chatre
2026-02-10 18:04 ` Reinette Chatre
2026-02-11 16:40 ` Ben Horgan
2026-02-11 19:46 ` Luck, Tony
2026-02-11 22:22 ` Reinette Chatre
2026-02-12 13:55 ` Ben Horgan
2026-02-12 18:37 ` Reinette Chatre
2026-02-16 15:18 ` Ben Horgan
2026-02-17 18:51 ` Reinette Chatre
2026-02-17 21:44 ` Luck, Tony
2026-02-17 22:37 ` Reinette Chatre
2026-02-17 22:52 ` Luck, Tony
2026-02-17 23:55 ` Reinette Chatre
2026-02-18 16:44 ` Luck, Tony
2026-02-19 17:03 ` Luck, Tony
2026-02-19 17:45 ` Ben Horgan
2026-02-20 8:21 ` Drew Fustini
2026-02-19 17:33 ` Ben Horgan [this message]
2026-02-20 2:53 ` Reinette Chatre
2026-02-20 22:44 ` Moger, Babu
2026-02-23 17:12 ` Reinette Chatre
2026-02-23 22:35 ` Moger, Babu
2026-02-23 23:13 ` Reinette Chatre
2026-02-24 19:37 ` Babu Moger
2026-02-23 10:08 ` Ben Horgan
2026-02-23 16:38 ` Reinette Chatre
2026-02-24 9:36 ` Ben Horgan
2026-02-24 16:13 ` Reinette Chatre
2026-02-19 11:06 ` Ben Horgan
2026-02-19 18:12 ` Luck, Tony
2026-02-19 18:36 ` Reinette Chatre
2026-02-19 10:21 ` Ben Horgan
2026-02-19 18:14 ` Reinette Chatre
2026-02-23 9:48 ` Ben Horgan
2026-02-13 16:37 ` Moger, Babu
2026-02-13 17:02 ` Luck, Tony
2026-02-16 19:24 ` Babu Moger
2026-02-14 0:10 ` Reinette Chatre
2026-02-16 15:41 ` Ben Horgan
2026-02-16 22:52 ` Moger, Babu
2026-02-17 15:56 ` Ben Horgan
2026-02-17 16:38 ` Babu Moger
2026-02-18 9:54 ` Ben Horgan
2026-02-18 6:22 ` Stephane Eranian
2026-02-18 9:35 ` Ben Horgan
2026-02-19 10:27 ` Ben Horgan
2026-02-16 22:36 ` Moger, Babu
2026-02-12 10:00 ` Ben Horgan
2026-01-21 21:12 ` [RFC PATCH 14/19] x86,fs/resctrl: Add the functionality to configure PLZA Babu Moger
2026-01-29 19:13 ` Luck, Tony
2026-01-29 19:53 ` Babu Moger
2026-01-21 21:12 ` [RFC PATCH 15/19] fs/resctrl: Introduce PLZA attribute in rdtgroup interface Babu Moger
2026-01-21 21:12 ` [RFC PATCH 16/19] fs/resctrl: Implement rdtgroup_plza_write() to configure PLZA in a group Babu Moger
2026-01-28 22:03 ` Luck, Tony
2026-01-29 18:54 ` Luck, Tony
2026-01-29 19:31 ` Babu Moger
2026-01-29 19:42 ` Babu Moger
2026-02-10 0:05 ` Reinette Chatre
2026-02-11 23:10 ` Moger, Babu
2026-01-21 21:12 ` [RFC PATCH 17/19] fs/resctrl: Update PLZA configuration when cpu_mask changes Babu Moger
2026-01-21 21:12 ` [RFC PATCH 18/19] x86/resctrl: Refactor show_rdt_tasks() to support PLZA task matching Babu Moger
2026-01-21 21:12 ` [RFC PATCH 19/19] fs/resctrl: Add per-task PLZA enable support via rdtgroup Babu Moger
2026-02-03 19:58 ` [RFC PATCH 00/19] x86,fs/resctrl: Support for Global Bandwidth Enforcement and Priviledge Level Zero Association Luck, Tony
2026-02-10 0:27 ` Reinette Chatre
2026-02-11 0:40 ` Drew Fustini
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=feaa16a5-765c-4c24-9e0b-c1f4ef87a66f@arm.com \
--to=ben.horgan@arm.com \
--cc=Babu.Moger@amd.com \
--cc=Dave.Martin@arm.com \
--cc=Manali.Shukla@amd.com \
--cc=Mario.Limonciello@amd.com \
--cc=Thomas.Lendacky@amd.com \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=bhelgaas@google.com \
--cc=bmoger@amd.com \
--cc=bp@alien8.de \
--cc=bsegall@google.com \
--cc=chang.seok.bae@intel.com \
--cc=corbet@lwn.net \
--cc=dapeng1.mi@linux.intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=dietmar.eggemann@arm.com \
--cc=elena.reshetova@intel.com \
--cc=eranian@google.com \
--cc=feng.tang@linux.alibaba.com \
--cc=fustini@kernel.org \
--cc=fvdl@google.com \
--cc=gautham.shenoy@amd.com \
--cc=hpa@zytor.com \
--cc=james.morse@arm.com \
--cc=juri.lelli@redhat.com \
--cc=kees@kernel.org \
--cc=kvm@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lirongqing@baidu.com \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=naveen@kernel.org \
--cc=pawan.kumar.gupta@linux.intel.com \
--cc=peternewman@google.com \
--cc=peterz@infradead.org \
--cc=pmladek@suse.com \
--cc=reinette.chatre@intel.com \
--cc=rostedt@goodmis.org \
--cc=seanjc@google.com \
--cc=tglx@kernel.org \
--cc=tony.luck@intel.com \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.com \
--cc=x86@kernel.org \
--cc=xin@zytor.com \
/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®