Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp4271091rwb; Mon, 31 Jul 2023 04:33:30 -0700 (PDT) X-Google-Smtp-Source: APBJJlFzKdXJrQXjDoT8jcxodBni9k5AaZHXjXmkIuHvN4GSawYh8SoVgLIMU0bFsOkgng1JVaYJ X-Received: by 2002:aa7:d903:0:b0:522:1956:a29e with SMTP id a3-20020aa7d903000000b005221956a29emr7526549edr.34.1690803210261; Mon, 31 Jul 2023 04:33:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690803210; cv=none; d=google.com; s=arc-20160816; b=ruSSGk6/Gz31zHOWTLmQ3z4LFWaH4kbivwu/rVvae8k2g7M45cT+X/+DqYr4ohv6bK dJBiO3/GgTT9T+F85BPrIdorkVwMfc+5LH/l0MbNnCP6syrZZgmqukLolZxFsDbmU2yE NOjzuvNVd0vy1XhMkFuzrFpodaMiRR1lh/8kUByHFGWTJg2MXQwEOg8kIbGHma1TKPUR VXGxdeaaPqpn5DZ9pepS4KTOaxA8JBn9K1VeMd4BCLrraiqBhNNzI+Ss58znNCt2fokZ bIyBl3Q4WRqDfb3geqWf+rUw8MYNU4jtt5OTHXXulgrhrBSw5LQS98P92Df5TvpYA/i2 IoAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=QsRNsjRfTmn24aGFtC3YGXjM0MgO+nfS6Z39o8zwtlQ=; fh=gulV2bhTFHQYYAsa8GZq4ZtrR556JRIRIkg9A2LPWyw=; b=IsiA9/XmOocRbEOGptb1XN2x0GejLxRVhNITN3IoT/Y8cTCbiIcMv295LpDGstp5tV ablSLXP4pQNm4KJZk6G1S1fQd3zU3em3+So4YpnMbD7IYxQ90ISxM3NObgYRnzoo/efR 4WZIsOFmBNhKXpIKj2YzI6eaGWhPqgQ/DRZWafbHlsDeXE/VhirY729PWEQtdyDAiDTY 4zjvs7wrRunCudjrwRqBqVKxhX+8cTXdeuGswQQm0/5zPDytvh5gc96W4eMDnv6PR6r6 uh9CcMzFrMOvrEHhoiKGi+CTwx+E46AB83hcLdHD8nSyFbiovNP/LV7hZ9STJON8Hs97 zlrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=M5VNR6GD; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b22-20020aa7d496000000b00522566f1d17si2615946edr.227.2023.07.31.04.32.56; Mon, 31 Jul 2023 04:33:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=M5VNR6GD; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232228AbjGaKUR (ORCPT + 99 others); Mon, 31 Jul 2023 06:20:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55512 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232166AbjGaKUI (ORCPT ); Mon, 31 Jul 2023 06:20:08 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C063173D; Mon, 31 Jul 2023 03:19:49 -0700 (PDT) Date: Mon, 31 Jul 2023 10:19:47 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1690798787; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QsRNsjRfTmn24aGFtC3YGXjM0MgO+nfS6Z39o8zwtlQ=; b=M5VNR6GDdDVgNHgIHq2nRSCW9cH/hoap5+ZT7X4r04coB3h9E8A5JYt7RpsDVJ/AfUYh8i WuJRV4o8bkR4wjWW+kscSs2mwKPiGEVqrVe2VohkDlYf5hF3wPHr5GJ/3gDW2s2cob3Pkz 8ZfXIo4pst1KNKagJkxHkY1QefVo5YISwO/i1Rupcq4g6HE2tIBe6XliC7Pm8nGBfBvfcK iCdcR1kfCPwJDjEDYo/j9BjU2Nm21w2KTOhx7KT9ZOrKF2i7jzLwsSQrgDlzZZm3zn2YQ/ m8SkBYeRIHmqFvscFUqAIKRnhLqmp8IPuQVflSEALbE9Ih0kt6SqssHdvJwMdQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1690798787; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QsRNsjRfTmn24aGFtC3YGXjM0MgO+nfS6Z39o8zwtlQ=; b=oFzMs+pAY8xrvxelmyhz3LapbJAozYWn+qv3NgbzKdRdvE8jvxYjXYLP4TPYxQpO1y9FI4 3MROx4jyMpyewWBg== From: "tip-bot2 for Vincent Guittot" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: sched/core] sched/fair: remove util_est boosting Cc: Vincent Guittot , "Peter Zijlstra (Intel)" , Dietmar Eggemann , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20230706135144.324311-1-vincent.guittot@linaro.org> References: <20230706135144.324311-1-vincent.guittot@linaro.org> MIME-Version: 1.0 Message-ID: <169079878708.28540.11161051369114712527.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the sched/core branch of tip: Commit-ID: c2e164ac33f75e0acb93004960c73bd9166d3d35 Gitweb: https://git.kernel.org/tip/c2e164ac33f75e0acb93004960c73bd9166d3d35 Author: Vincent Guittot AuthorDate: Thu, 06 Jul 2023 15:51:44 +02:00 Committer: Peter Zijlstra CommitterDate: Wed, 26 Jul 2023 12:28:50 +02:00 sched/fair: remove util_est boosting There is no need to use runnable_avg when estimating util_est and that even generates wrong behavior because one includes blocked tasks whereas the other one doesn't. This can lead to accounting twice the waking task p, once with the blocked runnable_avg and another one when adding its util_est. cpu's runnable_avg is already used when computing util_avg which is then compared with util_est. In some situation, feec will not select prev_cpu but another one on the same performance domain because of higher max_util Fixes: 7d0583cf9ec7 ("sched/fair, cpufreq: Introduce 'runnable boosting'") Signed-off-by: Vincent Guittot Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Dietmar Eggemann Tested-by: Dietmar Eggemann Link: https://lore.kernel.org/r/20230706135144.324311-1-vincent.guittot@linaro.org --- kernel/sched/fair.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index d3df5b1..f55b0a7 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -7320,9 +7320,6 @@ cpu_util(int cpu, struct task_struct *p, int dst_cpu, int boost) util_est = READ_ONCE(cfs_rq->avg.util_est.enqueued); - if (boost) - util_est = max(util_est, runnable); - /* * During wake-up @p isn't enqueued yet and doesn't contribute * to any cpu_rq(cpu)->cfs.avg.util_est.enqueued.