mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Chen, Yu C" <yu.c.chen@intel.com>
To: Reinette Chatre <reinette.chatre@intel.com>
Cc: Tony Luck <tony.luck@intel.com>, 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>,
	Dave Martin <Dave.Martin@arm.com>,
	Ben Horgan <ben.horgan@arm.com>,
	James Morse <james.morse@arm.com>,
	Babu Moger <babu.moger@amd.com>,
	Drew Fustini <fustini@kernel.org>,
	Fenghua Yu <fenghuay@nvidia.com>,
	"chen.yu@linux.dev" <chen.yu@linux.dev>
Subject: Re: [RFC v2] arm,x86,fs/resctrl: Generic schema description Proof of Concept
Date: Tue, 11 Aug 2026 01:23:38 +0800	[thread overview]
Message-ID: <e859ba7a-d488-4c35-b0e2-fc88cdb34f29@intel.com> (raw)
In-Reply-To: <07a79f5f-ad39-447d-b43d-01e44c7870a2@intel.com>

Hi Reinette,

On 8/10/2026 11:53 PM, Reinette Chatre wrote:

[ ... ]

>> item 1.
>> In legacy mode, we intend to always let the "native" controller
>> emulate the "legacy" controller - at least for the region‑aware
>> RDT case.
>> Q1: Is this understanding correct?
> 
> As I understand region-aware is what actually makes this impossible to do
> since there is no mapping from "legacy" percentage based control value to
> "native" control value. Even more, the hardware self has two separate interfaces:
> "legacy" uses MSR interface and "native" uses ACPI interface. As I see it a
> region aware system in "legacy" mode is using the "legacy" MSR interface and
> not use the "native" ACPI interface *at all*.
>   

OK. Previously I might have misunderstood what "legacy" means in this 
context:
"legacy control means using the existing MB interface in the schemata to
change the percentage value. That is to say, no matter whether
the underlying mechanism is based on MSR or MMIO, it is transparent to the
resctrl user."
which was discussed 
here:https://lore.kernel.org/lkml/87e4ca90-01bb-47e9-8892-0d2d56468bc0@intel.com/
I think "legacy" now refers to "MSR" in the context of region-aware RDT,
due to lack of mapping between MSR-based and MMIO-based values.

>> item 2.
>> In commit fbed64f80515 ("x86/resctrl: SAMPLE: Emulated controls"),
>> during resctrl initialization, __get_mem_config_intel() clears
>> the legacy controller's hw_ctrl->msr_update to NULL, and sets
>> its emulation controllers in hw_ctrl->r_ctrl.emulated_by to
>> the region-aware related controllers. So legacy controller is
>> emulated by region-aware controllers.
>>
>> item 3.
>> In resctrl_arch_control_mode_set(), when switching to "legacy"
>> mode, the legacy controller is set to:
>> hw_ctrl->msr_update = update_temporary_legacy_MB;
>> while the emulating controller is set to NULL:
>> hw_ctrl->msr_update = NULL;
>> That means, the emulated controllers will not take effect.
>>
>> Q2:Does item 3 contradict item 1?
> The switching of .msr_update() is sample code to present a PoC of how
> region-aware could be supported based on my understanding described above.
> I expected that, for example, when user space switches the control mode between
> "legacy"/"native" then the region-aware code would disable/enable region-aware
> mode via the RDT_CTRL register and adjust the .msr_update() to match what
> hardware interface is active.
> 
> If at some point in future it becomes possible for resctrl to know how to
> map a legacy control value to a native control value for region aware then this
> switching should no longer be necessary and the "native" fine grained controller
> can always be used to emulate the "legacy" percentage based controller and to
> support this the ACPI interface would be enabled all the time.
> 

Then for the current region-aware MBA, should we add region-aware 
controllers
as the same level as legacy controller, instead of adding them in legacy
controllers' emulated_by list, since the legacy controller is not
emulated by region-aware controllers? And we might need to introduce 
enable/disable
flag per controller, which could be switched on/off when switching between
legacy and native.

thanks,
Chenyu

> I do not think any of the other architectures' features would need something
> like this.
> 
> Reinette
> 
> 

  reply	other threads:[~2026-08-10 17:23 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-04  5:26 Reinette Chatre
2026-08-05 16:59 ` Ben Horgan
2026-08-05 23:57   ` Reinette Chatre
2026-08-06 17:04     ` Luck, Tony
2026-08-06 17:11       ` Reinette Chatre
2026-08-07 14:14         ` Moger, Babu
2026-08-07 15:35           ` Reinette Chatre
2026-08-07 18:33             ` Moger, Babu
2026-08-07 22:53               ` Reinette Chatre
2026-08-10 18:52                 ` Babu Moger
2026-08-11  4:06                   ` Reinette Chatre
2026-08-11 14:59                     ` Babu Moger
2026-08-11 15:30                       ` Reinette Chatre
2026-08-11 16:09                         ` Babu Moger
2026-08-24 14:40                 ` Ben Horgan
2026-08-24 18:07                   ` Reinette Chatre
2026-08-25 15:20                     ` Ben Horgan
2026-08-07 15:35           ` Chen, Yu C
2026-08-07 17:57             ` Moger, Babu
2026-08-10  2:05 ` Chen, Yu C
2026-08-10 15:53   ` Reinette Chatre
2026-08-10 17:23     ` Chen, Yu C [this message]
2026-08-10 18:09       ` Reinette Chatre
2026-08-11  3:49         ` Chen, Yu C
2026-08-13 13:59           ` Chen Yu
2026-08-13 15:19             ` Reinette Chatre
2026-08-18 16:02               ` Chen Yu
2026-08-18 17:10                 ` Reinette Chatre
2026-09-14  2:49         ` Chen Yu
2026-09-18 23:11           ` Reinette Chatre
2026-09-21  5:13             ` Chen, Yu C
2026-09-21 15:01               ` Reinette Chatre
2026-09-22  3:19                 ` Chen, Yu C
2026-09-21 16:21               ` Luck, Tony
2026-08-10  2:55 ` Fenghua Yu
2026-08-10  3:02   ` Chen, Yu C
2026-08-10  3:25     ` Fenghua Yu
2026-08-10  5:24       ` Chen, Yu C
2026-08-10 15:53   ` Reinette Chatre
2026-08-17 15:09     ` Reinette Chatre
2026-09-11 10:09     ` Ben Horgan
2026-09-18 22:47       ` Reinette Chatre
2026-09-21 10:22         ` Ben Horgan
2026-09-21 16:06           ` Reinette Chatre
2026-09-21 16:53             ` Ben Horgan
2026-09-23 15:28               ` Reinette Chatre
2026-09-24 14:38                 ` Ben Horgan
2026-09-21 13:56 ` [RFC PATCH 0/3] Suggestions for cache scalar controls Ben Horgan
2026-09-21 13:57   ` [RFC PATCH 1/3] fs/resctrl: Add schema_name to struct resctrl_ctrl Ben Horgan
2026-09-22 20:15     ` Drew Fustini
2026-09-23  9:05       ` Ben Horgan
2026-09-21 13:57   ` [RFC PATCH 2/3] fs/resctrl: Use correct schema name in bw_validate() last_cmd_status messages Ben Horgan
2026-09-21 13:57   ` [RFC PATCH 3/3] fs/resctrl: display size for scalar cache controls Ben Horgan
2026-09-21 14:08   ` [RFC PATCH 0/3] Suggestions for cache scalar controls Ben Horgan
2026-09-22 20:26   ` 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=e859ba7a-d488-4c35-b0e2-fc88cdb34f29@intel.com \
    --to=yu.c.chen@intel.com \
    --cc=Dave.Martin@arm.com \
    --cc=babu.moger@amd.com \
    --cc=ben.horgan@arm.com \
    --cc=bp@alien8.de \
    --cc=chen.yu@linux.dev \
    --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=reinette.chatre@intel.com \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --cc=x86@kernel.org \
    /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®