Re: [RFC] mpam,x86,fs/resctrl: Generic schema description Proof of Concept

From: Chen, Yu C

Date: Wed Jun 03 2026 - 08:05:01 EST


Hi Reinette,

On 6/3/2026 11:45 AM, Reinette Chatre wrote:
Hi Chenyu,


[ ... ]


Thanks for re-spinning this patch set.
Looking at commit (fs/resctrl: Introduce additional schema properties),
the newly added properties appear to be implemented for the
MBA resctrl_membw controller.

Please do note that the "struct resctrl_membw" naming is temporary. I only kept
current naming to help folks find where existing known structures land in this new
design but the "struct resctrl_membw" name is not appropriate moving forward.

When user space interacts with the new controls the intention is that each control
has a "type" that the user can find in the new "type" file and depending on that value
the user will know what other files/properties can be expected.

In this PoC there are two types: "scalar" and "bitmap" and each is associated with
a struct that contains the properties associated with that type.

Considering this, these structures could, for example, be renamed as (very long):
struct resctrl_membw -> struct resctrl_ctrl_scalar
struct resctrl_cache -> struct resctrl_ctrl_bitmap


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?

Would it make sense for these properties to be generic across all resctrl
controllers, CAT included? Should they consequently be relocated into
struct resctrl_ctrl if that approach is appropriate?

If there are properties that are common across all controls of all types
then they should be moved to struct resctrl_ctrl. Current examples are "type"
and "scope" that user space can expect from every control. It is not obvious to
me at this time what other properties we can designate as common in this way.

For bitmaps there is already the properties that are available in the top-level
directory. These can just be replicated as properties into the resource_schemata,
but perhaps using new names as suggested by Dave in
https://lore.kernel.org/lkml/aQOUAeVP9oc7RIn%2F@xxxxxxxxxxxxxxx/


Got it. Will further look into the code.

thanks,
Chenyu