lkml.org 
[lkml]   [2014]   [May]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] sched: call select_idle_sibling when not affine_sd
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;
> }

[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2014-05-14 18:21    [W:0.080 / U:0.276 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site