mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Babu Moger <babu.moger@amd.com>
To: Reinette Chatre <reinette.chatre@intel.com>,
	"Moger, Babu" <bmoger@amd.com>,
	corbet@lwn.net, tony.luck@intel.com, Dave.Martin@arm.com,
	james.morse@arm.com, tglx@kernel.org, bp@alien8.de,
	ben.horgan@arm.com, fenghuay@nvidia.com
Cc: skhan@linuxfoundation.org, x86@kernel.org, mingo@redhat.com,
	dave.hansen@linux.intel.com, hpa@zytor.com,
	akpm@linux-foundation.org, rdunlap@infradead.org,
	peterz@infradead.org, feng.tang@linux.alibaba.com,
	dapeng1.mi@linux.intel.com, elver@google.com,
	enelsonmoore@gmail.com, kuba@kernel.org, ebiggers@kernel.org,
	lirongqing@baidu.com, seanjc@google.com, nikunj@amd.com,
	xin@zytor.com, pawan.kumar.gupta@linux.intel.com,
	tiala@microsoft.com, chang.seok.bae@intel.com,
	kprateek.nayak@amd.com, prathyushi.nangia@amd.com,
	kim.phillips@amd.com, naveen@kernel.org, darwi@linutronix.de,
	elena.reshetova@intel.com, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org, thomas.lendacky@amd.com,
	eranian@google.com, peternewman@google.com,
	qinyuntan@linux.alibaba.com
Subject: Re: [RESEND PATCH v4 04/15] fs/resctrl: Introduce kernel mode (kmode) data structures
Date: Thu, 13 Aug 2026 14:11:20 -0500	[thread overview]
Message-ID: <08d27ac3-c5a8-4926-8a60-f7e24d9c1564@amd.com> (raw)
In-Reply-To: <b4606050-277c-4a3f-9630-5453fa94df10@intel.com>

Hi Reinette,

On 8/13/26 13:18, Reinette Chatre wrote:
> Hi Babu,
> 
> On 8/13/26 10:12 AM, Babu Moger wrote:
>> Hi Reinette,
>>
>> On 8/13/26 10:55, Reinette Chatre wrote:
>>> Hi Babu,
>>>
>>> On 8/13/26 8:17 AM, Babu Moger wrote:
>>>> On 8/12/26 18:28, Reinette Chatre wrote:
>>>
>>>>> Please always keep in mind all the requirements and use cases we learned about
>>>>> during and after RFC v1 of this work.
>>>>>
>>>>> For example, we already know that "per group" assignment is something resctrl
>>>>> needs to be ready for. Consider the example in
>>>>> https://lore.kernel.org/lkml/aYyxAPdTFejzsE42@e134344.arm.com/
>>>>>
>>>>> There may even be "per task" assignment in the future.
>>>>
>>>> Yes. That is correct.
>>>>
>>>>>
>>>>> Constraining this feature to PLZA will make it harder to enable the capabilities
>>>>> that we know resctrl need to support in the future.
>>>>>
>>>>> This is how we originally landed on the "global" assignment distinction
>>>>> (https://lore.kernel.org/lkml/2ab556af-095b-422b-9396-f845c6fd0342@intel.com/)
>>>>> "global assignment" should be kept or replaced with a solution that continues to
>>>>> prepare resctrl for these other capabilities.
>>>>
>>>> Yes. Makes sense.
>>>>
>>>>>
>>>>> I am not able to see how resctrl could support "per group" assignment with the
>>>>> interface you propose above. If I am missing this, please highlight the solution.
>>>>>
>>>>> resctrl may need to explicitly split kernel mode from kernel mode properties. For
>>>>> example, below shows an "assign_global_enable_per_cpu" as the kernel mode, now with three
>>>>> properties:
>>>>> - "ctrl" - could be "assign" or "inherit"
>>>>> - "mon" - could be "assign" or "inherit"
>>>>> - "group" - required if "ctrl" or "mon" is set to "assign"
>>>>
>>>> ok.
>>>>
>>>>
>>>>>
>>>>>       # cat info/kernel_mode
>>>>>       [inherit]
>>>>>       assign_global_enable_per_cpu:ctrl=assign;mon=assign;group=uninitialized
>>>>
>>>> Shouldn't this be like below when default is inherit?
>>>>
>>>> # cat info/kernel_mode
>>>> [inherit]
>>>> assign_global_enable_per_cpu
>>>>
>>>
>>> I think it will be useful to let the interface:
>>>    (a) show to user space which properties are available for each supported mode, and
>>>    (b) show user space what the default value of those properties will be if they
>>>        are not set when the associated mode is enabled.
>>
>> The "inherit" is the default property if it is not explicitly set. Right?
> 
> "property" is different from "kernel mode"
> 
> Each "kernel mode" can have zero or more properties.
> "inherit" is the default "kernel mode", but it could have a better/more descriptive name.
> For example, "inherit_from_user" or ...?

Or "user_inherit_kernel" ?

> 
>>
>> # cat info/kernel_mode
>> [inherit]
>> assign_global_enable_per_cpu:ctrl=inherit;mon=inherit;group=uninitialized
>>
>>
>> If the intention is to display all supported values for each
>> property, then we should do so consistently for all properties. For
>> example:
> 
> No. The intention is not to display all supported values for properties of the
> different kernel modes. Just display which properties are supported and what value resctrl
> would use if the user enables that mode without providing a value for a particular
> property. There may be properties that could have values for which it will
> be difficult to provide all supported values.
> 
> For example, if "kernel_mode" contains:
>        # cat info/kernel_mode
>        [inherit]
>        assign_global_enable_per_cpu:ctrl=assign;mon=assign;group=//
> 
> Then user space knows that if they enable "assign_global_enable_per_cpu" kernel mode
> without providing any properties then all kernel work will use the default resource
> group's allocation and monitoring. If that is not what user space wants then they
> can change the value of only the properties they need to change.

That sounds reasonable.

When the group is bound to the global mode,

# cat info/kernel_mode
   inherit
   [assign_global_enable_per_cpu:ctrl=assign;group=ctrl1//]

> 
> 
>>
>> # cat info/kernel_mode
>> [inherit]
>> assign_global_enable_per_cpu:ctrl=inherit,assign;mon=inherit,assign;group=uninitialized
>>
>>
>>>
>>> To (b), since the default resource group is used as default when the group
>>> is not provided it may be better to use "//" (or just "/", depending on system
>>> supporting just one of allocation or monitoring) instead of "uninitialized".
>>>
>>
>> To me, showing the default group would be confusing. It could give
>> the impression that only the default group is associated with the
>> [inherit] mode, even when multiple resource groups exist.
> 
> I do not see how default group is associated with the "inherit" mode since inherit mode
> does not have a "group" property?

Yes. Got it.

Thanks,
Babu

  reply	other threads:[~2026-08-13 19:11 UTC|newest]

Thread overview: 79+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-07 21:50 [RESEND PATCH v4 00/15] x86/resctrl: Add kernel-mode (e.g., PLZA) support to the resctrl subsystem Babu Moger
2026-07-07 21:50 ` [RESEND PATCH v4 01/15] x86/resctrl: Support Privilege Level Zero Association (PLZA) Babu Moger
2026-07-07 22:01   ` Borislav Petkov
2026-07-08 14:51     ` Babu Moger
2026-07-08 17:27       ` Borislav Petkov
2026-07-08 16:55   ` Babu Moger
2026-07-08 23:28     ` Borislav Petkov
2026-07-09  0:00       ` Namhyung Kim
2026-07-09  0:12         ` Borislav Petkov
2026-07-10  0:55           ` Namhyung Kim
2026-07-10  1:46             ` Borislav Petkov
2026-08-11  2:51   ` Reinette Chatre
2026-08-11 20:02     ` Babu Moger
2026-07-07 21:50 ` [RESEND PATCH v4 02/15] x86/resctrl: Add PLZA support to command-line options Babu Moger
2026-07-08 17:39   ` Babu Moger
2026-08-11  2:53   ` Reinette Chatre
2026-08-11 20:03     ` Babu Moger
2026-07-07 21:50 ` [RESEND PATCH v4 03/15] x86/resctrl: Add data structures and definitions for PLZA configuration Babu Moger
2026-07-08 20:20   ` Babu Moger
2026-08-11  2:58   ` Reinette Chatre
2026-08-11 21:10     ` Babu Moger
2026-08-11 23:51       ` Reinette Chatre
2026-08-12 14:18         ` Moger, Babu
2026-07-07 21:50 ` [RESEND PATCH v4 04/15] fs/resctrl: Introduce kernel mode (kmode) data structures Babu Moger
2026-07-08 20:56   ` Babu Moger
2026-08-11  3:03   ` Reinette Chatre
2026-08-12 19:58     ` Moger, Babu
2026-08-12 23:28       ` Reinette Chatre
2026-08-13 15:17         ` Babu Moger
2026-08-13 15:55           ` Reinette Chatre
2026-08-13 17:12             ` Babu Moger
2026-08-13 18:18               ` Reinette Chatre
2026-08-13 19:11                 ` Babu Moger [this message]
2026-08-13 21:12                   ` Reinette Chatre
2026-08-13 22:33                     ` Moger, Babu
2026-07-07 21:50 ` [RESEND PATCH v4 05/15] x86,fs/resctrl: Introduce architecture hooks to program kernel-mode Babu Moger
2026-07-08 23:04   ` Moger, Babu
2026-08-11  3:14   ` Reinette Chatre
2026-08-12 22:11     ` Moger, Babu
2026-08-12 23:34       ` Reinette Chatre
2026-08-13 15:39         ` Babu Moger
2026-07-07 21:50 ` [RESEND PATCH v4 06/15] fs/resctrl: Introduce resctrl_set_kmode_support() to initialize supported modes Babu Moger
2026-08-11  3:16   ` Reinette Chatre
2026-08-12 22:28     ` Moger, Babu
2026-07-07 21:50 ` [RESEND PATCH v4 07/15] x86/resctrl: Expose the supported PLZA kernel-mode policies during init Babu Moger
2026-07-09 15:15   ` Babu Moger
2026-07-07 21:50 ` [RESEND PATCH v4 08/15] fs/resctrl: Add interface to display supported and active kernel-mode policy Babu Moger
2026-08-11  3:18   ` Reinette Chatre
2026-08-12 22:57     ` Moger, Babu
2026-08-12 23:38       ` Reinette Chatre
2026-08-13 16:04         ` Babu Moger
2026-08-13 18:23           ` Reinette Chatre
2026-07-07 21:50 ` [RESEND PATCH v4 09/15] fs/resctrl: Introduce kmode_cpus/kmode_cpus_list per rdtgroup Babu Moger
2026-08-11  3:20   ` Reinette Chatre
2026-08-13 17:57     ` Babu Moger
2026-08-13 18:19       ` Reinette Chatre
2026-08-13 19:27         ` Babu Moger
2026-08-13 20:49           ` Reinette Chatre
2026-08-13 22:41             ` Moger, Babu
2026-07-07 21:50 ` [RESEND PATCH v4 10/15] fs/resctrl: Reset the kernel-mode binding when an rdtgroup is removed Babu Moger
2026-07-09 18:15   ` Babu Moger
2026-08-11  3:29   ` Reinette Chatre
2026-08-13 19:48     ` Babu Moger
2026-07-07 21:50 ` [RESEND PATCH v4 11/15] fs/resctrl: Program kernel-mode binding when CPU comes online Babu Moger
2026-07-09 20:01   ` Babu Moger
2026-07-07 21:50 ` [RESEND PATCH v4 12/15] fs/resctrl: Hide kmode_cpus[_list] on groups not bound to kernel-mode Babu Moger
2026-08-11  3:30   ` Reinette Chatre
2026-08-13 20:07     ` Babu Moger
2026-07-07 21:50 ` [RESEND PATCH v4 13/15] fs/resctrl: Add interface to modify kernel-mode via info/kernel_mode Babu Moger
2026-07-09 22:46   ` Moger, Babu
2026-08-11  3:40   ` Reinette Chatre
2026-08-13 20:55     ` Babu Moger
2026-08-13 21:21       ` Reinette Chatre
2026-08-13 22:27         ` Moger, Babu
2026-07-07 21:50 ` [RESEND PATCH v4 14/15] fs/resctrl: Allow user space to write kmode_cpus/kmode_cpus_list Babu Moger
2026-07-09 23:14   ` Moger, Babu
2026-08-11  3:49   ` Reinette Chatre
2026-08-14 15:10     ` Moger, Babu
2026-07-07 21:50 ` [RESEND PATCH v4 15/15] fs/resctrl: Add documentation on kernel_mode with example Babu Moger

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=08d27ac3-c5a8-4926-8a60-f7e24d9c1564@amd.com \
    --to=babu.moger@amd.com \
    --cc=Dave.Martin@arm.com \
    --cc=akpm@linux-foundation.org \
    --cc=ben.horgan@arm.com \
    --cc=bmoger@amd.com \
    --cc=bp@alien8.de \
    --cc=chang.seok.bae@intel.com \
    --cc=corbet@lwn.net \
    --cc=dapeng1.mi@linux.intel.com \
    --cc=darwi@linutronix.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=ebiggers@kernel.org \
    --cc=elena.reshetova@intel.com \
    --cc=elver@google.com \
    --cc=enelsonmoore@gmail.com \
    --cc=eranian@google.com \
    --cc=feng.tang@linux.alibaba.com \
    --cc=fenghuay@nvidia.com \
    --cc=hpa@zytor.com \
    --cc=james.morse@arm.com \
    --cc=kim.phillips@amd.com \
    --cc=kprateek.nayak@amd.com \
    --cc=kuba@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lirongqing@baidu.com \
    --cc=mingo@redhat.com \
    --cc=naveen@kernel.org \
    --cc=nikunj@amd.com \
    --cc=pawan.kumar.gupta@linux.intel.com \
    --cc=peternewman@google.com \
    --cc=peterz@infradead.org \
    --cc=prathyushi.nangia@amd.com \
    --cc=qinyuntan@linux.alibaba.com \
    --cc=rdunlap@infradead.org \
    --cc=reinette.chatre@intel.com \
    --cc=seanjc@google.com \
    --cc=skhan@linuxfoundation.org \
    --cc=tglx@kernel.org \
    --cc=thomas.lendacky@amd.com \
    --cc=tiala@microsoft.com \
    --cc=tony.luck@intel.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®