RE: [PATCH 05/11] fs/resctrl: Use accurate type for rdt_resource::rid

Luck, Tony
2026-03-03T23:26:29Z

> I am seeing three different values being considered:
> - The number of resources supported by resctrl fs.
> - The number of resources supported by architecture.
> - The maximum resource id supported by architecture.
> At this time RDT_NUM_RESOURCES is used for all three on x86 but these three
> numbers can be different.

Agreed.

> Letting rdt_num_resources be the maximum resource ID supported by the architecture
> will not avoid that resctrl_arch_get_resource() be called for a resource that is
> not supported by the architecture nor does it avoid resctrl fs calling
> resctrl_arch_get_resource() for resource IDs larger than the maximum set by
> the architecture.

I hadn't considered the other calls to resctrl_arch_get_resource()

Drop my idea and stick with your patch 5.

-Tony