lkml.org 
[lkml]   [2014]   [Apr]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V5 3/8] sched: remove source_load and target_load
On Wed, Apr 16, 2014 at 10:43:24AM +0800, Alex Shi wrote:
> We have no load_idx any more, so source/target_load always return the
> same value as weighted_cpuload. So we can remove these 2 functions.

That's just not true:

> -/*
> - * Return a low guess at the load of a migration-source cpu weighted
> - * according to the scheduling class and "nice" value.
> - *
> - * We want to under-estimate the load of migration sources, to
> - * balance conservatively.
> - */
> -static unsigned long source_load(int cpu)
> -{
> - struct rq *rq = cpu_rq(cpu);
> - unsigned long total = weighted_cpuload(cpu);
> -
> - if (!sched_feat(LB_BIAS))
> - return total;
> -
> - return min(rq->cpu_load, total);
> -}
> -
> -/*
> - * Return a high guess at the load of a migration-target cpu weighted
> - * according to the scheduling class and "nice" value.
> - */
> -static unsigned long target_load(int cpu)
> -{
> - struct rq *rq = cpu_rq(cpu);
> - unsigned long total = weighted_cpuload(cpu);
> -
> - if (!sched_feat(LB_BIAS))
> - return total;
> -
> - return max(rq->cpu_load, total);
> -}




\
 
 \ /
  Last update: 2014-04-24 16:41    [W:0.148 / U:9.296 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site