Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit de5eb2dd authored by Joonsoo Kim's avatar Joonsoo Kim Committed by Ingo Molnar
Browse files

sched: Explicitly cpu_idle_type checking in rebalance_domains()



After commit 88b8dac0, dst-cpu can be changed in load_balance(),
then we can't know cpu_idle_type of dst-cpu when load_balance()
return positive. So, add explicit cpu_idle_type checking.

Signed-off-by: default avatarJoonsoo Kim <iamjoonsoo.kim@lge.com>
Tested-by: default avatarJason Low <jason.low2@hp.com>
Acked-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com>
Cc: Davidlohr Bueso <davidlohr.bueso@hp.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1366705662-3587-3-git-send-email-iamjoonsoo.kim@lge.com


Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent f1cd0858
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -5523,10 +5523,11 @@ 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.
				 * 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;
		}