From: Reinette Chatre <reinette.chatre@intel.com>
To: "Luck, Tony" <tony.luck@intel.com>
Cc: Fenghua Yu <fenghuay@nvidia.com>,
Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com>,
Peter Newman <peternewman@google.com>,
James Morse <james.morse@arm.com>,
Babu Moger <babu.moger@amd.com>,
"Drew Fustini" <dfustini@baylibre.com>,
Dave Martin <Dave.Martin@arm.com>, Chen Yu <yu.c.chen@intel.com>,
<x86@kernel.org>, <linux-kernel@vger.kernel.org>,
<patches@lists.linux.dev>
Subject: Re: [RFC PATCH 0/8] arm,x86,fs/resctrl: Support asymmetric L2 cache allocation
Date: Tue, 27 Oct 2026 11:30:37 -0700 [thread overview]
Message-ID: <dbc8fc24-2ca3-4152-9bfa-81b6e5d502a9@intel.com> (raw)
In-Reply-To: <auDiLEujZ5BGCACj@agluck-desk3>
Hi Tony,
On 10/27/26 10:41 AM, Luck, Tony wrote:
> On Mon, Oct 26, 2026 at 03:30:57PM -0700, Reinette Chatre wrote:
>> Hi Tony,
>>
>> On 10/26/26 2:57 PM, Tony Luck wrote:
>>> RFC patch series built on top of Reinette's multiple control series[1]
>>>
>>> The goal is to support L2 cache allocation on hybrid Intel CPUs such as
>>> Panther Lake[2] where the P-core and E-core CPUs have different number
>>> of supported bits for L2 cache bit mask controls. N.B. it is assumned
>>> that the only point of asymmetry is the cache bit mask length. Other
>>> parameters must be the same (but code doesn't check).
>>>
>>> Overall approach is to add the per-L2 cache bitmask length to the domain
>>> and use that everywhere instead of using a single value from the control.
>>>
>>> Patch 1 changes the format of the per-control "max" file and should be
>>> merged back into Reinette's multi-control series so this file can have
>>> a consistent format from first upstream introduction.
>>>
>>> Patches 2-5 are enumeration and preperation.
>>>
>>> Patch 6 introduces, initializes, and uses the per-domain cache bit mask
>>> length field (arm/MPAM change needs careful scrutiny).
>>>
>>> Patch 7 enables asymmetric L2 for x86 CPUs that enumerate it. N.B. it
>>> renammes the resource from "L2" to "L2A" to avoid user interface issues
>>> with tools that expect L2 cache allocation to be symmetric.
>>
>> I did a quick scan and it seems to ignore the the distinction between a resource
>> and control as highlighted the previous time you brought up this work. Specifically,
>> please see:
>>
>> https://lore.kernel.org/lkml/eaeb4259-46d6-4656-8354-669ad32654b5@intel.com/
>
> I think I see now. You want the "asymmetry" to be a property of the
> control, not of the resource.
Asymmetry could be a property of the resource but this is not what this proposal
does. This proposal creates a new L2 resource under a different name when resctrl
already has an L2 resource.
>
> So the resource name stays as "L2" but the control gets a suffix (e.g. "_ASYM")
For a new control this is reasonable, but since L2 is a legacy resource it is
expected to have a control with the same name as the resource to not break
user space. This is what I aimed to highlighted in the previous thread.
>
> File system looks like this:
>
> # tree
> .
> ├── cpus
> ├── cpus_list
> ├── info
> │ ├── L2
> │ │ ├── bit_usage
> │ │ ├── control_mode
> │ │ ├── min_cbm_bits
> │ │ ├── num_closids
> │ │ ├── schemata
This needs an L2 control. As I highlighted in
https://lore.kernel.org/lkml/22ecec13-a703-414e-9f5e-75c89173e845@intel.com/
when considering pqos utility user space expects an L2 schemata file entry
when there is an L2 resource.
Since L2_ASYM is the native interface it could be used to emulate the legacy L2 control
albeit with poor performance. By default the schemata file only contains the L2 control
and a user space familiar with new interface can enable L2_ASYM to replace L2 control
in schemata file.
When I mentioned this before you referred to it as:
"I'm not seeing a market for the legacy behavior, so implementing it
would just add complexity to resctrl without any benefit to users."
https://lore.kernel.org/lkml/as6Y72SbiXcJh6Ei@agluck-desk3/
I aimed to highlight in that discussion that users depend on this behavior.
> │ │ │ └── L2_ASYM
> │ │ │ ├── max
> │ │ │ ├── min_bits
> │ │ │ └── type
> │ │ ├── shareable_bits
> │ │ └── sparse_masks
> │ └── last_cmd_status
> ├── mode
> ├── schemata
> ├── size
> └── tasks
>
> and the schemata file:
>
> # cat schemata
> L2_ASYM:0=fff;1=fff;2=fff;3=fff;4=ffff;5=ffff;8=ffff
If there is a L2 resource then schemata file should only contain L2_ASYM if user space
indicates familiarity with new interface.
>
>>
>> Also, why does patch #1 drop the 0x prefix from new control interface when displaying hex
>> values to user space? This is a significant change for which patch #1 does not provide
>> a motivation.
>
> Sorry for missing out the justification. I thought that matching the
> format of the schemata file would be more useful. Then someone could
> reset a group to maximum values with:
>
> # echo L2_ASYM:$(cat /sys/fs/resctrl/info/L2/schemata/L2_ASYM/max) > schemata
>
> But if you like the "0x" prefixes I'm OK with that too. Just need to
> replace "cat" with "sed -e s/0x//g" to reset to maximum values.
CBM writes to schemata file accepts 0x prefix, no?
The 0x prefix is from the original interface proposal that aims support
generic parsing:
https://lore.kernel.org/lkml/aPtfMFfLV1l%2FRB0L@e133380.arm.com/
I see your point about matching the schemata file though. Now that the max is
per domain it really does resemble the schemata entry more closely. The bitmap
max could thus be expected to match the schemata entry more closely, forcing us to
carry this display decision into the new interface.
Reinette
prev parent reply other threads:[~2026-10-27 18:30 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-26 21:57 Tony Luck
2026-10-26 21:57 ` [RFC PATCH 1/8] fs/resctrl: Change UI of "max" file (merge back into earlier patches) Tony Luck
2026-10-26 21:57 ` [RFC PATCH 2/8] x86/resctrl: Add L2CAT quirk for Intel Panther Lake Tony Luck
2026-10-26 21:57 ` [RFC PATCH 3/8] x86/cpuid: Add and use defines for Intel RDT enumeration leaves Tony Luck
2026-10-26 21:57 ` [RFC PATCH 4/8] x86/resctrl: Add X86_FEATURE bits for asymmetric L2 Tony Luck
2026-10-26 21:57 ` [RFC PATCH 5/8] x86/resctrl: Refactor rdt_get_cache_alloc_cfg() Tony Luck
2026-10-26 21:57 ` [RFC PATCH 6/8] arm,x86,fs/resctrl: Prepare for asymmetric caches Tony Luck
2026-10-26 21:57 ` [RFC PATCH 7/8] x86/resctrl: Check for and enable asymmetric L2 cache allocation Tony Luck
2026-10-26 21:57 ` [RFC PATCH 8/8] fs/resctrl: Suppress creation of cbm_mask info file on asymmetric systems Tony Luck
2026-10-26 22:30 ` [RFC PATCH 0/8] arm,x86,fs/resctrl: Support asymmetric L2 cache allocation Reinette Chatre
2026-10-27 17:41 ` Luck, Tony
2026-10-27 18:30 ` 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=dbc8fc24-2ca3-4152-9bfa-81b6e5d502a9@intel.com \
--to=reinette.chatre@intel.com \
--cc=Dave.Martin@arm.com \
--cc=babu.moger@amd.com \
--cc=dfustini@baylibre.com \
--cc=fenghuay@nvidia.com \
--cc=james.morse@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maciej.wieczor-retman@intel.com \
--cc=patches@lists.linux.dev \
--cc=peternewman@google.com \
--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®