mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Reinette Chatre <reinette.chatre@intel.com>
To: Chen Yu <yu.c.chen@intel.com>
Cc: Tony Luck <tony.luck@intel.com>, Ben Horgan <ben.horgan@arm.com>,
	"James Morse" <james.morse@arm.com>,
	Dave Martin <Dave.Martin@arm.com>,
	Babu Moger <babu.moger@amd.com>,
	Drew Fustini <fustini@kernel.org>,
	Fenghua Yu <fenghuay@nvidia.com>,
	Jinjie Ruan <ruanjinjie@huawei.com>,
	Borislav Petkov <bp@alien8.de>,
	Thomas Gleixner <tglx@linutronix.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	Peter Newman <peternewman@google.com>,
	"chen.yu@linux.dev x86@kernel.org" <x86@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [RFC v3] arm,x86,fs/resctrl: Generic schema description Proof of Concept
Date: Wed, 25 Nov 2026 15:15:04 -0800	[thread overview]
Message-ID: <89f56594-9088-4b3e-ac7f-0cf911e08731@intel.com> (raw)
In-Reply-To: <awZtxwVxIRx/oyOB@chenyu-dev>

Hi Chenyu,

On 11/24/26 9:10 PM, Chen Yu wrote:
> On Mon, Nov 23, 2026 at 08:26:50PM -0800, Reinette Chatre wrote:
>> On 11/22/26 7:16 PM, Chen Yu wrote:
>>> On Thu, Nov 19, 2026 at 09:04:26PM -0800, Reinette Chatre wrote:

...

> 
> OK. Regarding the existing documentation, I found one minor issue, perhaps.
> 
> diff --git a/Documentation/filesystems/resctrl.rst b/Documentation/filesystems/resctrl.rst
> index d4a77858a959..d06087af4c61 100644
> --- a/Documentation/filesystems/resctrl.rst
> +++ b/Documentation/filesystems/resctrl.rst
> @@ -1066,7 +1066,7 @@ only be produced if creation of a control or monitor group fails.
> 
>  Schemata files - general concepts
>  ---------------------------------
> -Each line in the file describes one resource. The line starts with
> +Each line in the file describes one control of the resource. The line starts with
> 

Thank you very much for this. I am confident that there are many more changes needed
for the documentation to be consistent and coherent after the introduction of multiple
controls support.

>>>
>>> "control scope":
>>>         The granularity at which the hardware is able to control the
>>>         resource. One control value applies to one instance of the control
>>>         scope, and the control scope determines what a domain ID in the
>>>         schemata file represents. It is exposed via the control's "scope"
>>>         file.
>>
>> "One control value applies to one instance of the control scope" sounds strange.
>> The control value allocates a portion of the resource at the scope of the control
>> so having it "apply to an instance of the control scope" does not sound right, it
>> applies to the resource, no?
> 
> Right, the final target is the resource.
> 
>> One useful test here is how it reads when applied to GLBE - where the control
>> includes more than one instance of the resource, and referring to that as
>> an instance of the control scope is not accurate.
> 
> OK, I see. GLBE is a good example: the control value applies to one or more instances
> of the resource (1 instance represents 1 resource scope).

That is based on an assumption that the control scope is larger than the resource
scope, which I do not think is required.
...

>>>
>>> BTW, can we provide a control flag that indicates whether the controller(even
>>> the new controllers than the legacy ones) want to display the alloc_scope/control scope
>>> via schemata? On v3, the region_aware schemata becomes:
>>
>> This does not sound right. resctrl filesystem aims to establish a consistent naming
>> convention with user space. The way I read this, you request a flag that an architecture can
>> use to indicate whether it wants to follow that convention or not? resctrl filesystem
>> aims to provide a generic and consistent interface to user space, irrespective of the
>> architecture. Passing ownership of interface to architecture breaks this, no?
>>
> 
> I was thinking if the resctrl filesystem can provide a fine-grained control naming
> convention for the arch driver, so the arch driver can choose which option it prefers,
> just like the resctrl_ctrl_name[] array is provided by resctrl and chosen by the arch driver.
> I was just thinking that for some arch, exposing both the resource's alloc_scope and the
> controller's scope seems to generate a long name/format. But it is OK to expose this for
> all the new non-legacy controls.

resctrl filesystem controls the user interface - its goal is to present a generic interface
that user space can rely on to be consistent across all architectures. If there is any
preference, then it should come from the user, not from an architecture.

...

>>
> 
> OK, I'm also thinking of the min/max/opt clamp among different controls. As you mentioned in the cover
> letter, this logic can be embedded in fs/resctrl(by doing santity check in the staging buffer)

In the cover letter I was actually trying to convey that doing this reliably and consistently in
resctrl filesystem is difficult and leaning towards this being done by architecture. resctrl
filesystem should be able to handle relationships among controls if they support the same
control values, but that is not guaranteed. 

Consider, for example, the example of MPAM's min and max controls (I think region-aware may
have similar layout in legacy mode?):

info/
└── MB/
    └── schemata/
        ├── MB/
        │   └── MB_MAX/
        └── MB_MIN/

When in legacy mode user space can set new control values for the MB and MB_MIN controls - since
the MPAM driver manages the conversion from MB control value to MB_MAX control value it is not
obvious how resctrl filesystem can enforce the relationship.

For now I've just left it as-is - the filesystem allows user space to write a control value to
the MIN control that is larger than the control value written to MAX.

As noted this is still an open so we can discuss now as part of this RFC how best to handle this.

...  
 
> No, you did not miss anything. After a second thought, for the region-aware RDT case,
> we can switch msr_update between NULL and a valid hook to support only ONE scenario at
> a time, and the arch driver knows it. Previously I was thinking of supporting both
> scenarios at the same time, and the msr_update() NULL check cannot deal with that alone.
The solution as described is not clear to me but I am glad that you found a strategy to support
region-aware RDT with the new foundation provided here.

Reinette 


      reply	other threads:[~2026-11-25 23:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-20  5:04 Reinette Chatre
2026-11-20 19:48 ` Fenghua Yu
2026-11-20 20:26   ` Reinette Chatre
2026-11-23  3:16 ` Chen Yu
2026-11-24  4:26   ` Reinette Chatre
2026-11-25  5:10     ` Chen Yu
2026-11-25 23:15       ` Reinette Chatre [this message]

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=89f56594-9088-4b3e-ac7f-0cf911e08731@intel.com \
    --to=reinette.chatre@intel.com \
    --cc=Dave.Martin@arm.com \
    --cc=babu.moger@amd.com \
    --cc=ben.horgan@arm.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=fenghuay@nvidia.com \
    --cc=fustini@kernel.org \
    --cc=james.morse@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peternewman@google.com \
    --cc=ruanjinjie@huawei.com \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --cc=x86@kernel.org \
    --cc=yu.c.chen@intel.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®