sched/fair: Fix nohz.next_balance update
authorVincent Guittot <vincent.guittot@linaro.org>
Mon, 3 Aug 2015 09:55:50 +0000 (11:55 +0200)
committerIngo Molnar <mingo@kernel.org>
Sun, 13 Sep 2015 07:52:51 +0000 (09:52 +0200)
commitc5afb6a87f2386bcf09fa051e6ca390d43e2222e
tree3ba5357eeeb0d056db25c8e7869c4cbd854c40cc
parent446685e9bfa11174332fbb0b3218b37015fbf4ff
sched/fair: Fix nohz.next_balance update

Since commit:

  d4573c3e1c99 ("sched: Improve load balancing in the presence of idle CPUs")

the ILB CPU starts with the idle load balancing of other idle CPUs and
finishes with itself in order to speed up the spread of tasks in all
idle CPUs.

The this_rq->next_balance is still used in nohz_idle_balance() as an
intermediate step to gather the shortest next balance before updating
nohz.next_balance. But the former has not been updated yet and is likely to
be set with the current jiffies. As a result, the nohz.next_balance will be
set with current jiffies instead of the real next balance date. This
generates spurious kicks of nohz ilde balance.

nohz_idle_balance() must set the nohz.next_balance without taking into
account this_rq->next_balance which is not updated yet. Then, this_rq will
update nohz.next_update with its next_balance once updated and if necessary.

Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Jason Low <jason.low2@hp.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: preeti@linux.vnet.ibm.com
Link: http://lkml.kernel.org/r/1438595750-20455-1-git-send-email-vincent.guittot@linaro.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/sched/fair.c
This page took 0.024606 seconds and 5 git commands to generate.