lkml.org 
[lkml]   [2015]   [Jun]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH RESEND] sched: prefer an idle cpu vs an idle sibling for BALANCE_WAKE
On 05/29/2015 05:03 PM, Josef Bacik wrote:
> On 05/28/2015 07:05 AM, Peter Zijlstra wrote:
>>
>> So maybe you want something like the below; that cures the thing Morten
>> raised, and we continue looking for sd, even after we found affine_sd.
>>
>> It also avoids the pointless idle_cpu() check Mike raised by making
>> select_idle_sibling() return -1 if it doesn't find anything.
>>
>> Then it continues doing the full balance IFF sd was set, which is keyed
>> off of sd->flags.
>>
>> And note (as Mike already said), BALANCE_WAKE does _NOT_ look for idle
>> CPUs, it looks for the least loaded CPU. And its damn expensive.
>>
>>
>> Rewriting this entire thing is somewhere on the todo list :/
>>
>

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 */
}

if (sd_flag & SD_BALANCE_WAKE) {
And everything works fine. Does that seem reasonable? Thanks,

Josef


\
 
 \ /
  Last update: 2015-06-01 22:21    [W:0.300 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site