]> git.baikalelectronics.ru Git - kernel.git/commit
sched/cfs: change initial value of runnable_avg
authorVincent Guittot <vincent.guittot@linaro.org>
Wed, 24 Jun 2020 15:44:22 +0000 (17:44 +0200)
committerBorislav Petkov <bp@suse.de>
Sun, 28 Jun 2020 15:01:20 +0000 (17:01 +0200)
commite5916d21ff7d7048fe5f317a78a8b083e3dfd4c4
treee5f7d137033c19c399fc285d5931a737f7be4f2f
parentbda5653c5462bc2660b06046d56693fe3747e112
sched/cfs: change initial value of runnable_avg

Some performance regression on reaim benchmark have been raised with
  commit 2af2a43aec4b ("sched/fair: Take into account runnable_avg to classify group")

The problem comes from the init value of runnable_avg which is initialized
with max value. This can be a problem if the newly forked task is finally
a short task because the group of CPUs is wrongly set to overloaded and
tasks are pulled less agressively.

Set initial value of runnable_avg equals to util_avg to reflect that there
is no waiting time so far.

Fixes: 2af2a43aec4b ("sched/fair: Take into account runnable_avg to classify group")
Reported-by: kernel test robot <rong.a.chen@intel.com>
Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20200624154422.29166-1-vincent.guittot@linaro.org
kernel/sched/fair.c