lkml.org 
[lkml]   [2013]   [Mar]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 4/8] sched: clean up move_task() and move_one_task()
From
Date
On Thu, 2013-02-14 at 14:48 +0900, Joonsoo Kim wrote:
> Some validation for task moving is performed in move_tasks() and
> move_one_task(). We can move these code to can_migrate_task()
> which is already exist for this purpose.

> @@ -4011,18 +4027,7 @@ static int move_tasks(struct lb_env *env)
> break;
> }
>
> - if (throttled_lb_pair(task_group(p), env->src_cpu, env->dst_cpu))
> - goto next;
> -
> - load = task_h_load(p);
> -
> - if (sched_feat(LB_MIN) && load < 16 && !env->sd->nr_balance_failed)
> - goto next;
> -
> - if ((load / 2) > env->imbalance)
> - goto next;
> -
> - if (!can_migrate_task(p, env))
> + if (!can_migrate_task(p, env, false, &load))
> goto next;
>
> move_task(p, env);

Right, so I'm not so taken with this one. The whole load stuff really
is a balance heuristic that's part of move_tasks(), move_one_task()
really doesn't care about that.

So why did you include it? Purely so you didn't have to re-order the
tests? I don't see any reason not to flip a tests around.



\
 
 \ /
  Last update: 2013-03-19 18:41    [W:0.198 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site