From: Peter Zijlstra <peterz@infradead.org>
To: Aaron Lu <aaron.lu@intel.com>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Tim Chen <tim.c.chen@linux.intel.com>,
Dave Hansen <dave.hansen@intel.com>,
Huang Ying <ying.huang@intel.com>
Subject: Re: [PATCH resend] smp: avoid sending needless IPI in smp_call_function_many()
Date: Fri, 19 May 2017 13:09:51 +0200 [thread overview]
Message-ID: <20170519110951.afpvoewwmszdnob5@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20170519075331.GE2084@aaronlu.sh.intel.com>
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.
next prev parent reply other threads:[~2017-05-19 11:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-28 13:19 [PATCH] smp: do not send IPI if call_single_queue not empty Aaron Lu
2017-05-19 7:53 ` [PATCH resend] smp: avoid sending needless IPI in smp_call_function_many() Aaron Lu
2017-05-19 10:59 ` Peter Zijlstra
2017-05-22 8:04 ` Aaron Lu
2017-05-19 11:09 ` Peter Zijlstra [this message]
2017-05-23 8:42 ` [tip:sched/core] smp: Avoid " tip-bot for Aaron Lu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170519110951.afpvoewwmszdnob5@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=aaron.lu@intel.com \
--cc=dave.hansen@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
--cc=tim.c.chen@linux.intel.com \
--cc=ying.huang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).