Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1645524

Re: [PATCH resend] smp: avoid sending needless IPI in smp_call_function_many()

From Peter Zijlstra <peterz@infradead.org>
Newsgroups linux.kernel
Subject Re: [PATCH resend] smp: avoid sending needless IPI in smp_call_function_many()
Date 2017-05-19 13:20 +0200
Message-ID <tIO6S-1nG-17@gated-at.bofh.it> (permalink)
References <tBe89-7Rw-3@gated-at.bofh.it> <tIKZk-7rF-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH resend] smp: avoid sending needless IPI in  smp_call_function_many() Aaron Lu <aaron.lu@intel.com> - 2017-05-19 10:00 +0200
  Re: [PATCH resend] smp: avoid sending needless IPI in  smp_call_function_many() Peter Zijlstra <peterz@infradead.org> - 2017-05-19 13:10 +0200
    Re: [PATCH resend] smp: avoid sending needless IPI in  smp_call_function_many() Aaron Lu <aaron.lu@intel.com> - 2017-05-22 10:10 +0200
  Re: [PATCH resend] smp: avoid sending needless IPI in  smp_call_function_many() Peter Zijlstra <peterz@infradead.org> - 2017-05-19 13:20 +0200
  [tip:sched/core] smp: Avoid sending needless IPI in  smp_call_function_many() tip-bot for Aaron Lu <tipbot@zytor.com> - 2017-05-23 10:50 +0200

csiph-web