sched/fair: Prepare __update_cpu_load() to handle active tickless
authorByungchul Park <byungchul.park@lge.com>
Wed, 14 Oct 2015 09:47:35 +0000 (18:47 +0900)
committerIngo Molnar <mingo@kernel.org>
Mon, 23 Nov 2015 08:37:53 +0000 (09:37 +0100)
commit59543275488d18d878cd2ab2b1072efc1e9ac1c4
tree14a2adb44795038e35c9209fb3d509eed53bd15a
parentd937cdc59e363baf8d5c757d944b13ebfa33e729
sched/fair: Prepare __update_cpu_load() to handle active tickless

There are some cases where distance between ticks is more than one tick
while the CPU is not idle, e.g. full NOHZ.

However __update_cpu_load() assumes it is the idle tickless case if the
distance between ticks is more than 1, even though it can be the active
tickless case as well. Thus in the active tickless case, updating the CPU
load will not be performed correctly.

Where the current code assumes the load for each tick is zero, this is
(obviously) not true in non-idle tickless case. We can approximately
consider the load ~= this_rq->cpu_load[0] during tickless in non-idle
tickless case.

Signed-off-by: Byungchul Park <byungchul.park@lge.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
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>
Link: http://lkml.kernel.org/r/1444816056-11886-2-git-send-email-byungchul.park@lge.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/sched/fair.c