lkml.org 
[lkml]   [2015]   [Jun]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH RESEND] sched: prefer an idle cpu vs an idle sibling for BALANCE_WAKE
On 06/01/2015 03:38 PM, Josef Bacik wrote:

> Ok I got this patch to give me the same performance as all our other
> crap, just need to apply this incremental
>
>
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index b71eb2b..e11cfec 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -4761,13 +4761,10 @@ select_task_rq_fair(struct task_struct *p, int
> prev_cpu, int sd_flag, int wake_f
>
> if (tmp->flags & sd_flag)
> sd = tmp;
> - else if (!want_affine || (want_affine && affine_sd))
> - break;
> }
>
> if (affine_sd && cpu != prev_cpu && wake_affine(affine_sd, p, sync)) {
> prev_cpu = cpu;
> - sd = NULL; /* WAKE_AFFINE trumps BALANCE_WAKE */

Given Peter's worries about wake_affine and affine_sd,
should the above be sd = affine_sd, in case select_idle_sibling
cannot find an idle sibling?

That way we can attempt to at least find an idle cpu inside
the affine_sd.

Of course, there may be subtleties here I am overlooking...

> }
>
> if (sd_flag & SD_BALANCE_WAKE) {


--
All rights reversed


\
 
 \ /
  Last update: 2015-06-02 00:41    [W:0.251 / U:0.312 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site