lkml.org 
[lkml]   [2015]   [Mar]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFCv3 PATCH 43/48] sched: Introduce energy awareness into detach_tasks
On 02/04/2015 10:31 AM, Morten Rasmussen wrote:
> From: Dietmar Eggemann <dietmar.eggemann@arm.com>
> while (!list_empty(tasks)) {
> @@ -6121,6 +6121,20 @@ static int detach_tasks(struct lb_env *env)
> if (!can_migrate_task(p, env))
> goto next;
>
> + if (env->use_ea) {
> + struct energy_env eenv = {
> + .src_cpu = env->src_cpu,
> + .dst_cpu = env->dst_cpu,
> + .usage_delta = task_utilization(p),
> + };
> + int e_diff = energy_diff(&eenv);
> +
> + if (e_diff >= 0)
> + goto next;
> +
> + goto detach;
> + }
> +
> load = task_h_load(p);
>
> if (sched_feat(LB_MIN) && load < 16 && !env->sd->nr_balance_failed)
> @@ -6129,6 +6143,7 @@ static int detach_tasks(struct lb_env *env)
> if ((load / 2) > env->imbalance)
> goto next;
>
> +detach:
> detach_task(p, env);
> list_add(&p->se.group_node, &env->tasks);

Hi Morten, Dietmar,

Wouldn't the above energy_diff() use the 'old' value of dst_cpu's util?
Tasks are detached/dequeued in this loop so they have their util
contrib. removed from src_cpu but their contrib. hasn't been added to
dst_cpu yet (happens in attach_tasks).

Thanks,
-Sai


\
 
 \ /
  Last update: 2015-03-26 01:01    [W:0.706 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site