All of lore.kernel.org
 help / color / mirror / Atom feed
From: Reinette Chatre <reinette.chatre@intel.com>
To: "Chen, Yu C" <yu.c.chen@intel.com>
Cc: Borislav Petkov <bp@alien8.de>,
	Thomas Gleixner <tglx@linutronix.de>,
	"Dave Hansen" <dave.hansen@linux.intel.com>,
	Peter Newman <peternewman@google.com>,
	"x86@kernel.org" <x86@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Tony Luck <tony.luck@intel.com>,
	Dave Martin <Dave.Martin@arm.com>,
	James Morse <james.morse@arm.com>,
	Ben Horgan <ben.horgan@arm.com>, Babu Moger <babu.moger@amd.com>,
	Drew Fustini <fustini@kernel.org>,
	Fenghua Yu <fenghuay@nvidia.com>
Subject: Re: [RFC] mpam,x86,fs/resctrl: Generic schema description Proof of Concept
Date: Fri, 5 Jun 2026 09:20:35 -0700	[thread overview]
Message-ID: <93203398-89cd-454c-bd6c-72c97d4c8564@intel.com> (raw)
In-Reply-To: <dc5d5f4f-ee60-4f67-a501-0b185d4a4f88@intel.com>

Hi Chenyu,

On 6/5/26 8:43 AM, Chen, Yu C wrote:
> Hi Reinette,
> 
> On 6/5/2026 12:37 AM, Reinette Chatre wrote:
> 
> [ ... ]
> 
>>>
>>> OK, the type field serves as the primary key for querying other properties.
>>> Alongside the "type" entry, there also exists a "flag" property. I haven't
>>> spotted this field within resctrl_membw, though it appears in resctrl_cache
>>> via arch_has_sparse_bitmasks. Would it make sense to introduce a dedicated
>>> enum for this flag, or alternatively reuse the existing bw_delay_linear for MBA?
>>
>> I realize now my previous answer to you was incomplete. You are right that there
>> is a plan to let the resctrl "type" file contain the schema type as well as
>> optional flags. This plan is unchanged but at this time it is not obvious to me
>> what flags this implementation should start with.
>>
>> In the original proposal [1] "linear" was provided as example of a flag for the MB
>> resource but as I worked through this PoC whether a control is linear or not seemed
>> to fit better as a resource property. This is how I ended up with commit
>> bdcd8ac6e946 ("mpam,x86,fs/resctrl: Make memory bandwidth delay a resource property")
>>
>> For this specific property I expect that all controls would have the same value. This
>> worked out well since resctrl already has the per-resource top level "delay_linear".
>>
>> We can surely move this back to be a control property and have it be the first
>> "flag" but at this time it seems to me that all MB controls would just have the same
>> flag value?
>>
>> Perhaps the safest alternative would be to keep it a resource property and just duplicate
>> this as a flag value among all the controls? I think this is what you are suggesting to
>> reuse the bw_delay_linear for MBA. This would not result in dedicated flags associated
>> with controls but it may set the user interface up for most flexibility.
>>
> 
> Yes I think we can simply reuse the value of bw_delay_linear when displaying the
> "flag" field for each controller under the info directory.
> BTW, would the L3 controller have similar case that, all L3 controllers of the same
> resource share the same value of "flag"? If yes, should we also move arch_has_sparse_bitmasks
> to rdt_resource? If yes, I'm not sure why we need "flag" in the controller.
Whether a control of type bitmap allows sparse values or not does seem to be a valid
property of the bitmap control to me. It is difficult to predict how this will land since
I am not familiar with a resource that has multiple bitmap controllers.

I do think having a controller type support different flags in the interface exposed to the
user does give resctrl most flexibility for the future. With the user interface having that
capability the internal implementation can always adapt.

Reinette

  reply	other threads:[~2026-06-05 16:20 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-29 18:06 [RFC] mpam,x86,fs/resctrl: Generic schema description Proof of Concept Reinette Chatre
2026-06-02 20:23 ` Babu Moger
2026-06-02 22:56   ` Reinette Chatre
2026-06-03  1:14     ` Moger, Babu
2026-06-03  3:55       ` Reinette Chatre
2026-06-03 14:40         ` Babu Moger
2026-06-02 23:32 ` Chen, Yu C
2026-06-03  3:45   ` Reinette Chatre
2026-06-03 11:53     ` Chen, Yu C
2026-06-04 16:37       ` Reinette Chatre
2026-06-05 15:43         ` Chen, Yu C
2026-06-05 16:20           ` Reinette Chatre [this message]
2026-06-03 15:15 ` Ben Horgan
2026-06-03 19:34   ` Drew Fustini
2026-06-04 11:24     ` Ben Horgan
2026-06-04 17:38       ` Drew Fustini
2026-06-04 21:05     ` Reinette Chatre
2026-06-05 19:35       ` Drew Fustini
2026-06-04 17:43   ` Reinette Chatre
2026-06-05 14:53     ` Ben Horgan
2026-06-05 15:39       ` Reinette Chatre
2026-06-05 16:37         ` Ben Horgan
2026-06-03 18:46 ` Luck, Tony
2026-06-04 10:02   ` Ben Horgan
2026-06-04 21:42   ` Reinette Chatre
2026-06-03 22:14 ` Drew Fustini
2026-06-04 21:47   ` Reinette Chatre
2026-06-05 19:48     ` 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=93203398-89cd-454c-bd6c-72c97d4c8564@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=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.