From: "tip-bot2 for Vincent Guittot" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: kernel test robot <rong.a.chen@intel.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
"Peter Zijlstra (Intel)" <peterz@infradead.org>,
x86 <x86@kernel.org>, LKML <linux-kernel@vger.kernel.org>
Subject: [tip: sched/urgent] sched/cfs: change initial value of runnable_avg
Date: Thu, 25 Jun 2020 11:53:23 -0000 [thread overview]
Message-ID: <159308600329.16989.15117119529654032761.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20200624154422.29166-1-vincent.guittot@linaro.org>
The following commit has been merged into the sched/urgent branch of tip:
Commit-ID: 68f7b5cc835de7d5b6c7696533c126018171e793
Gitweb: https://git.kernel.org/tip/68f7b5cc835de7d5b6c7696533c126018171e793
Author: Vincent Guittot <vincent.guittot@linaro.org>
AuthorDate: Wed, 24 Jun 2020 17:44:22 +02:00
Committer: Peter Zijlstra <peterz@infradead.org>
CommitterDate: Thu, 25 Jun 2020 13:45:38 +02:00
sched/cfs: change initial value of runnable_avg
Some performance regression on reaim benchmark have been raised with
commit 070f5e860ee2 ("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: 070f5e860ee2 ("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 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index cbcb2f7..658aa7a 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -806,7 +806,7 @@ void post_init_entity_util_avg(struct task_struct *p)
}
}
- sa->runnable_avg = cpu_scale;
+ sa->runnable_avg = sa->util_avg;
if (p->sched_class != &fair_sched_class) {
/*
prev parent reply other threads:[~2020-06-25 11:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-24 15:44 [PATCH] sched/cfs: change initial value of runnable_avg Vincent Guittot
2020-06-24 16:32 ` Valentin Schneider
2020-06-24 16:40 ` Vincent Guittot
2020-06-25 9:24 ` Holger Hoffstätte
2020-06-25 9:56 ` Vincent Guittot
2020-06-25 10:42 ` Holger Hoffstätte
2020-06-25 12:08 ` Vincent Guittot
2020-06-25 22:03 ` Holger Hoffstätte
2020-06-25 11:53 ` tip-bot2 for Vincent Guittot [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=159308600329.16989.15117119529654032761.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=rong.a.chen@intel.com \
--cc=vincent.guittot@linaro.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).