Re: [PATCH] x86/perf/intel/cqm: Get rid of the silly for_each_cpu lookups
From: Thomas Gleixner
Date: Wed Feb 17 2016 - 13:32:21 EST
On Wed, 17 Feb 2016, Vikas Shivappa wrote:
> > - cpumask_set_cpu(cpu, &cqm_cpumask);
> > + /* First online cpu in package becomes the reader */
> > + reader = cpumask_any_and(topology_core_cpumask(cpu), &cqm_cpumask);
> > + if (reader >= nr_cpu_ids)
> > + cpumask_set_cpu(cpu, &cqm_cpumask);
>
> I was confused by the topology_core_cpumask naming as its really the mask of
> all cpus in the same package. I sent a patch for cqm and rapl to fix this
> looping when you had given the same feedback during CAt patches review , but
> they have never made it so far due to CAT patch issues.
Duh, totally forgot about them.
> Would it be better to resend the rapl (looks like perf_uncore has same loop)
> fixes separately ?
Yes, please resend the rapl one. perf_uncore is a different trainwreck which I
fixed already:
lkml.kernel.org/r/20160217132903.767990400@xxxxxxxxxxxxx
Thanks,
tglx