RE: [PATCH v2 7/7] x86/resctrl: Determine if Sub-NUMA Cluster is enabled and initialize.

Luck, Tony
2023-06-26T15:52:13Z

>> +++ b/arch/x86/include/asm/resctrl.h
>> @@ -35,6 +35,8 @@ DECLARE_STATIC_KEY_FALSE(rdt_enable_key);
>> DECLARE_STATIC_KEY_FALSE(rdt_alloc_enable_key);
>> DECLARE_STATIC_KEY_FALSE(rdt_mon_enable_key);
>>
>> +DECLARE_PER_CPU(int, rmid_offset);
>> +
>
> I assumed that declarations in this file were those needed by
> __resctrl_sched_in(). Now that rmid_offset is used when setting
> PQR_ASSOC, would this go somewhere else?

PQR_ASSOC no longer needs rmid_offset. But QM_EVTSEL still does.

I'll take a look to see if all the SNC detection code can move into
monitor.c. Then rmid_offset could be static in that file. But if that gets
complicated I may leave it alone (with rmid_offset set in core.c and used
in monitor.c).

> Other than this and fixing the MSR update, the series looks fine to me.
>
> Reviewed-By: Peter Newman <peternewman@google.com>

Peter,

Thanks for testing and review. Did you also test on one of your systems
with a memory-only node? I recall that was an issue with my very first
patch series.

-Tony