RE: [PATCH 4/7] x86/resctrl: Add code to setup monitoring at L3 or NODE scope.

From: Luck, Tony
Date: Tue Feb 28 2023 - 12:28:26 EST


>> + /* When SNC enabled, monitor functions at node instead of L3 cache scope */
>> + if (snc_ways > 1)
>> + r = &rdt_resources_all[RDT_RESOURCE_NODE].r_resctrl;
>> + else
>> + r = &rdt_resources_all[RDT_RESOURCE_L3].r_resctrl;
>
> Could this be hidden in a helper with some name like resctrl_arch_get_mbm_resource()?
> You have the same pattern again in rdt_get_tree(). If this gets more complex in the
> future, it means its outside the filesystem code, and all in one place.

Sounds like a good idea. Thanks.

-Tony