From: Peter Zijlstra <peterz@infradead.org>
To: Rik van Riel <riel@redhat.com>
Cc: Mike Galbraith <umgwanakikbuti@gmail.com>,
linux-kernel@vger.kernel.org, morten.rasmussen@arm.com,
mingo@kernel.org, george.mccollister@gmail.com,
ktkhai@parallels.com, Mel Gorman <mgorman@suse.de>,
Vinod@twins.programming.kicks-ass.net
Subject: Re: [PATCH] sched: call select_idle_sibling when not affine_sd
Date: Wed, 14 May 2014 17:45:22 +0200 [thread overview]
Message-ID: <20140514154522.GP30445@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <20140514114037.2d93266f@annuminas.surriel.com>
[-- Attachment #1: Type: text/plain, Size: 1640 bytes --]
On Wed, May 14, 2014 at 11:40:37AM -0400, Rik van Riel wrote:
> Subject: sched: call select_idle_sibling when not affine_sd
>
> On smaller systems, the top level sched domain will be an affine
> domain, and select_idle_sibling is invoked for every SD_WAKE_AFFINE
> wakeup. This seems to be working well.
>
> On larger systems, with the node distance between far away NUMA nodes
> being > RECLAIM_DISTANCE, select_idle_sibling is only called if the
> waker and the wakee are on nodes less than RECLAIM_DISTANCE apart.
>
> This patch leaves in place the policy of not pulling the task across
> nodes on such systems, while fixing the issue that select_idle_sibling
> is not called at all in certain circumstances.
>
> The code will look for an idle CPU in the same CPU package as the
> CPU where the task ran previously.
>
> Signed-off-by: Rik van Riel <riel@redhat.com>
> ---
> kernel/sched/fair.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index 39b63d0..1e58159 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -4423,10 +4423,10 @@ select_task_rq_fair(struct task_struct *p, int prev_cpu, int sd_flag, int wake_f
> sd = tmp;
> }
>
> - if (affine_sd) {
> - if (cpu != prev_cpu && wake_affine(affine_sd, p, sync))
> - prev_cpu = cpu;
> + if (affine_sd && cpu != prev_cpu && wake_affine(affine_sd, p, sync))
> + prev_cpu = cpu;
>
> + if (sd_flag & SD_WAKE_AFFINE) {
I think you meant SD_BALANCE_WAKE?
> new_cpu = select_idle_sibling(p, prev_cpu);
> goto unlock;
> }
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2014-05-14 15:45 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-02 4:42 [PATCH RFC/TEST] sched: make sync affine wakeups work Rik van Riel
2014-05-02 5:32 ` Mike Galbraith
2014-05-02 5:41 ` Mike Galbraith
2014-05-02 5:58 ` Mike Galbraith
2014-05-02 6:08 ` Rik van Riel
2014-05-02 6:36 ` Mike Galbraith
2014-05-02 6:51 ` Mike Galbraith
2014-05-02 6:13 ` Mike Galbraith
2014-05-02 6:30 ` Rik van Riel
2014-05-02 7:37 ` Mike Galbraith
2014-05-02 10:56 ` Rik van Riel
2014-05-02 11:27 ` Mike Galbraith
2014-05-02 12:51 ` Mike Galbraith
[not found] ` <5363B793.9010208@redhat.com>
2014-05-06 11:54 ` Peter Zijlstra
2014-05-06 20:19 ` Rik van Riel
2014-05-06 20:39 ` Peter Zijlstra
2014-05-06 23:46 ` Rik van Riel
2014-05-09 2:20 ` Rik van Riel
2014-05-09 5:27 ` [PATCH] sched: wake up task on prev_cpu if not in SD_WAKE_AFFINE domain with cpu Rik van Riel
2014-05-09 6:04 ` [PATCH] sched: clean up select_task_rq_fair conditionals and indentation Rik van Riel
2014-05-09 7:34 ` [PATCH] sched: wake up task on prev_cpu if not in SD_WAKE_AFFINE domain with cpu Mike Galbraith
2014-05-09 14:22 ` Rik van Riel
2014-05-09 15:24 ` Mike Galbraith
2014-05-09 15:24 ` Rik van Riel
2014-05-09 17:55 ` Mike Galbraith
2014-05-09 18:16 ` Rik van Riel
2014-05-10 3:54 ` Mike Galbraith
2014-05-13 14:08 ` Rik van Riel
2014-05-14 4:08 ` Mike Galbraith
2014-05-14 15:40 ` [PATCH] sched: call select_idle_sibling when not affine_sd Rik van Riel
2014-05-14 15:45 ` Peter Zijlstra [this message]
2014-05-19 13:08 ` [tip:sched/core] " tip-bot for Rik van Riel
2014-05-22 12:27 ` [tip:sched/core] sched: Call select_idle_sibling() " tip-bot for Rik van Riel
2014-05-04 11:44 ` [PATCH RFC/TEST] sched: make sync affine wakeups work Preeti Murthy
2014-05-04 12:04 ` Mike Galbraith
2014-05-05 4:38 ` Preeti U Murthy
2014-05-04 12:41 ` Rik van Riel
2014-05-05 4:50 ` Preeti U Murthy
2014-05-05 6:43 ` Preeti U Murthy
2014-05-05 11:28 ` Rik van Riel
2014-05-06 13:26 ` Peter Zijlstra
2014-05-06 13:25 ` Peter Zijlstra
2014-05-06 20:20 ` Rik van Riel
2014-05-06 20:41 ` Peter Zijlstra
2014-05-07 12:17 ` Ingo Molnar
2014-05-06 11:56 ` Peter Zijlstra
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=20140514154522.GP30445@twins.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=Vinod@twins.programming.kicks-ass.net \
--cc=george.mccollister@gmail.com \
--cc=ktkhai@parallels.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@kernel.org \
--cc=morten.rasmussen@arm.com \
--cc=riel@redhat.com \
--cc=umgwanakikbuti@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.