Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1384851ybt; Thu, 25 Jun 2020 04:58:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzSP8S8ewlhgThujemgdqUcejjMt3/bqTU3u8dP8qh8z+Pn8EYk3CY3rqg+fne8UkYj5lOc X-Received: by 2002:a17:906:3041:: with SMTP id d1mr29937061ejd.7.1593086297233; Thu, 25 Jun 2020 04:58:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593086297; cv=none; d=google.com; s=arc-20160816; b=Vdua9khHxRv6DCKBWTLxJdXjfgh1wHF+qI9hhaneF6Q9kyxnzBDeuHdI5y5enASibo Axkd92TRGyK2zTprDxX4e1PJegm63owHsvNDNhe08cep4TKmeppStT4XTvP1h8YJJz3+ HuhdrQAs/WkW5yPOZBXXTY2YeKN8uXaO0JnTCLwGFKnj9fWglq0DlQDG19Zfu8975qQx izwxK+0kRYrpIs+8ldGHVXfknbaBlvx/89A9ZPlRCkmgMWq78hnw3vM1U32Yl2szm2QC 4sXBGufEryG3a7yBfz6SojA7ETyiPmzU5wqcholyMGnkrJO6z4Nffumw+kTf45/blHIU VBfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :robot-unsubscribe:robot-id:message-id:mime-version:references :in-reply-to:cc:subject:to:reply-to:from:date; bh=SlFPeEp6+ya/CdZKsaR+Xxx3gFGkPNQGclgTwkP1PWw=; b=HG9o2QpaFNN9qa/TSEKmT/Z698QRMUjT5NKUkynqeFmtF8RGYTCEssVQpTaCCNL7JA wmmsjyRHbk4Pr7ut81XFXLuRP4IY4IbJPeChLJ33KhsvuX4+UW5gDOo2IvtFUuTQ36LT CQtgiPs9DLeMRuzOyzFmjH4Yln5x/jIHOwkseOwDs731+mEb0J+2ZSAXk1Muz+ITplDX ixNwIXdvaW5G24lXOzx4x+eHhAVhr1s3NsjdkLsmBZWTSJzFAC6GOpGB+WJ38UIrIDgE DO9STQaaHEG0yJAK8m/WELgEbonYRYMfsCfwT9f3jqcRdsNuAhOdwFW7Gcohcl+wq4gY 9uWg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jp14si2932260ejb.93.2020.06.25.04.57.53; Thu, 25 Jun 2020 04:58:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404339AbgFYLxf (ORCPT + 99 others); Thu, 25 Jun 2020 07:53:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404265AbgFYLxe (ORCPT ); Thu, 25 Jun 2020 07:53:34 -0400 Received: from Galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84511C061573; Thu, 25 Jun 2020 04:53:34 -0700 (PDT) Received: from [5.158.153.53] (helo=tip-bot2.lab.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1joQRY-0005pt-0H; Thu, 25 Jun 2020 13:53:24 +0200 Received: from [127.0.1.1] (localhost [IPv6:::1]) by tip-bot2.lab.linutronix.de (Postfix) with ESMTP id 8F35D1C0092; Thu, 25 Jun 2020 13:53:23 +0200 (CEST) Date: Thu, 25 Jun 2020 11:53:23 -0000 From: "tip-bot2 for Vincent Guittot" Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: sched/urgent] sched/cfs: change initial value of runnable_avg Cc: kernel test robot , Vincent Guittot , "Peter Zijlstra (Intel)" , x86 , LKML In-Reply-To: <20200624154422.29166-1-vincent.guittot@linaro.org> References: <20200624154422.29166-1-vincent.guittot@linaro.org> MIME-Version: 1.0 Message-ID: <159308600329.16989.15117119529654032761.tip-bot2@tip-bot2> X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 AuthorDate: Wed, 24 Jun 2020 17:44:22 +02:00 Committer: Peter Zijlstra 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 Signed-off-by: Vincent Guittot Signed-off-by: Peter Zijlstra (Intel) 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) { /*