[lkml]   [2017]   [May]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH resend] smp: avoid sending needless IPI in smp_call_function_many()
On Fri, May 19, 2017 at 03:53:31PM +0800, Aaron Lu wrote:
> @@ -434,6 +442,7 @@ void smp_call_function_many(const struct cpumask *mask,
> if (unlikely(!cpumask_weight(cfd->cpumask)))
> return;

Another thing that occurred to me while staring at that function, is
that we could move:

cpumask_and(cfd->cpumask, mask, cpu_online_mask);

to the very begin of that function, that would then obviate the need for
that cpumask_weight() test afaict.

I'm not sure its worth the trouble, but it would make the function
slightly easier to look at.

 \ /
  Last update: 2017-05-19 13:10    [W:0.068 / U:0.600 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site