From: Peter Zijlstra <peterz@infradead.org>
To: "Nikunj A. Dadhania" <nikunj@linux.vnet.ibm.com>
Cc: mingo@elte.hu, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sched: remove redundant check in select_task_rq_fair
Date: Tue, 07 Jun 2011 11:53:34 +0200 [thread overview]
Message-ID: <1307440414.2322.236.camel@twins> (raw)
In-Reply-To: <20110607094821.29969.50197.stgit@IBM-009124035060.in.ibm.com>
On Tue, 2011-06-07 at 15:18 +0530, Nikunj A. Dadhania wrote:
> When balancing for wakeup affinity, a redundant check can removed.
Yes, tempting, but no, now you've got an extra call to wake_affine(),
which is more expensive.
> Signed-off-by: Nikunj A. Dadhania <nikunj@linux.vnet.ibm.com>
> ---
> kernel/sched_fair.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
> index 433491c..b9e5701 100644
> --- a/kernel/sched_fair.c
> +++ b/kernel/sched_fair.c
> @@ -1753,7 +1753,7 @@ select_task_rq_fair(struct task_struct *p, int sd_flag, int wake_flags)
> }
>
> if (affine_sd) {
> - if (cpu == prev_cpu || wake_affine(affine_sd, p, sync))
> + if (wake_affine(affine_sd, p, sync))
> prev_cpu = cpu;
>
> new_cpu = select_idle_sibling(p, prev_cpu);
>
next prev parent reply other threads:[~2011-06-07 9:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-07 9:48 Nikunj A. Dadhania
2011-06-07 9:53 ` Peter Zijlstra [this message]
2011-06-07 10:04 ` Nikunj A. Dadhania
2011-06-07 10:09 ` Peter Zijlstra
2011-06-07 10:20 ` Mike Galbraith
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=1307440414.2322.236.camel@twins \
--to=peterz@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=nikunj@linux.vnet.ibm.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
all inboxes | Powered by JetHome®