sched: Fix updating rq->max_idle_balance_cost and rq->next_balance in idle_balance()
authorJason Low <jason.low2@hp.com>
Mon, 28 Apr 2014 22:45:54 +0000 (15:45 -0700)
committerIngo Molnar <mingo@kernel.org>
Wed, 7 May 2014 09:51:36 +0000 (11:51 +0200)
commit0e5b5337f0da073e1f17aec3c322ea7826975d0d
tree3f47f8935bb09d489614f5d86421c84f92a40e73
parent6ccdc84b81a0a6c09a7f0427761d2f8cecfc2218
sched: Fix updating rq->max_idle_balance_cost and rq->next_balance in idle_balance()

The following commit:

  e5fc66119ec9 ("sched: Fix race in idle_balance()")

can potentially cause rq->max_idle_balance_cost to not be updated,
even when load_balance(NEWLY_IDLE) is attempted and the per-sd
max cost value is updated.

Preeti noticed a similar issue with updating rq->next_balance.

In this patch, we fix this by making sure we still check/update those values
even if a task gets enqueued while browsing the domains.

Signed-off-by: Jason Low <jason.low2@hp.com>
Reviewed-by: Preeti U Murthy <preeti@linux.vnet.ibm.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Cc: morten.rasmussen@arm.com
Cc: aswin@hp.com
Cc: daniel.lezcano@linaro.org
Cc: alex.shi@linaro.org
Cc: efault@gmx.de
Cc: vincent.guittot@linaro.org
Link: http://lkml.kernel.org/r/1398725155-7591-2-git-send-email-jason.low2@hp.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/sched/fair.c