Re: [RFC PATCH] x86/cpufeatures: Enumerate new AVX512 bfloat16 instructions

From: Fenghua Yu
Date: Wed Jun 12 2019 - 13:55:17 EST


On Wed, Jun 12, 2019 at 05:59:08AM +0200, Borislav Petkov wrote:
> On Wed, Jun 12, 2019 at 03:29:57AM +0000, Yu, Fenghua wrote:
> > My bad. I studied a bit more and found the patch #1 is not needed.
>
> Why, I think you were spot-on:
>
> "And the two variables are ONLY used in resctrl monitoring
> configuration. There is no need to store them in cpuinfo_x86 on each
> CPU."
>
> That was a real overkill to put them in cpuinfo_x86. The information
> needed should simply be read out in rdt_get_mon_l3_config() and that's
> it - no need to global values to store them.
>
> Now removing them should be in a separate patch so that review is easy.
>
> Or am I missing an aspect?

x86_init_cache_qos() fnds the minimum number of rmid on all CPUs and
store it in boot_cpu_data.

If removing the two variables from cpuinfo_x86 and getting number of
rmid and occupancy scale in rdt_get_mon_l3_config() directly from
CPUID on the current CPU, we need to assume all CPUs have the same
number of rmid.

Is this a right assumption?

After think again, it might be a right assumption after all. AFAICT, each
Intel platform that supports resctrl has the same number of rmid on all
CPUs and there is no plan to have a resctrl platform that has different
numbers of rmid on CPUs.

So Ok, I will write the patch #1 that removes the two variables from
cpuinfo_x86 and gets the info directly from CPUID in rdt_get_mon_l3_config().

Thanks.

-Fenghua