RE: [PATCH v4 1/2] x86/resctrl: Pass domain to target CPU

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > +                   hw_dom->ctrl_val[idx] = cfg->new_ctrl;
> > +                   cpu = cpumask_any(&d->cpu_mask);
>
> If this CPU is part of the domain, then cpumask_any() could chose a different CPU leading
> to an IPI, where this CPU could have done the work itself.
> smp_call_function_any() has the logic to try and run on this CPU if possible.
>
> As d->cpu_mask is still valid when you call smp_call_function_single(), could we use
> smp_call_function_any() instead?

I'd thought that cpumask_any() was smarter. But I see that it dumbly just picks the first
CPU in the mask.  Great suggestion, will add to next version.

>> -		cpumask_set_cpu(cpumask_any(&d->cpu_mask), cpu_mask);
>> +		cpu = cpumask_any(&d->cpu_mask);
>
> Same comment about picking an unlucky CPU here, smp_call_function_any() can improve our
> chances.

Will fix here too.

> Still:
> Reviewed-by: James Morse <james.morse@xxxxxxx>

Thanks!

-Tony




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux