lkml.org 
[lkml]   [2013]   [Apr]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 2/6] sched: explicitly cpu_idle_type checking in rebalance_domains()
From
Date
On Tue, 2013-03-26 at 15:01 +0900, Joonsoo Kim wrote:
> @@ -5506,10 +5506,10 @@ static void rebalance_domains(int cpu, enum
> cpu_idle_type idle)
> if (time_after_eq(jiffies, sd->last_balance +
> interval)) {
> if (load_balance(cpu, rq, sd, idle, &balance))
> {
> /*
> - * We've pulled tasks over so either
> we're no
> - * longer idle.
> + * We've pulled tasks over so either
> we may
> + * be no longer idle.
> */

That comment didn't make sense and it does even less now.

How about we make that:

/*
* The LBF_SOME_PINNED logic could have changed
* env->dst_cpu, so we can't know our idle state
* even if we migrated tasks; update it.
*/

> - idle = CPU_NOT_IDLE;
> + idle = idle_cpu(cpu) ? CPU_IDLE :
> CPU_NOT_IDLE;
> }
> sd->last_balance = jiffies;
> }




\
 
 \ /
  Last update: 2013-04-22 14:42    [W:0.077 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site