lkml.org 
[lkml]   [2012]   [May]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH 1/5] sched, fair: Let minimally loaded cpu balance the group
* Peter Zijlstra <a.p.zijlstra@chello.nl> [2012-05-01 20:14:31]:

> @@ -3795,12 +3796,11 @@ static inline void update_sg_lb_stats(st
>
> /* Bias balancing toward cpus of our domain */
> if (local_group) {
> - if (idle_cpu(i) && !first_idle_cpu) {
> - first_idle_cpu = 1;
> + load = target_load(i, load_idx);
> + if (load < balance_load || idle_cpu(i)) {
> + balance_load = load;

Let's say load_idx != 0 (ex: a busy cpu doing this load balance). In
that case, for a idle cpu, we could return non-zero load and hence this
would fail to select such a idle cpu? IOW :

balance_load = 0 iff idle_cpu(i) ??

> balance_cpu = i;
> }
> -
> - load = target_load(i, load_idx);
> } else {
> load = source_load(i, load_idx);
> if (load > max_cpu_load) {
>
>

- vatsa



\
 
 \ /
  Last update: 2012-05-02 13:01    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site