From nobody Wed Dec 17 12:46:23 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 26BCCC4167B for ; Fri, 1 Dec 2023 16:17:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378399AbjLAQRF (ORCPT ); Fri, 1 Dec 2023 11:17:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378341AbjLAQQ4 (ORCPT ); Fri, 1 Dec 2023 11:16:56 -0500 Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 52B171724 for ; Fri, 1 Dec 2023 08:17:02 -0800 (PST) Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-332ddd8e0bdso2238415f8f.0 for ; Fri, 01 Dec 2023 08:17:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701447421; x=1702052221; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=XSKzabyf617fM1KjEqCfZfHlIw32BDDg2adJnGl6QJ8=; b=DQ3YFnHounWAqRoT31a5f8sVryNO0uLYEC2wE8ZUzQOYOPszbJfX/sqHsyoEhw4tOp pl/JcCzJZfhLx8yy0SQKRx3bKjmPYFW7gUr9skm+xEMYbAeUTp9fQo5ViDq64Ga1kVaT mLx9kY/PWRB/IoPUQZV16xa9OYNbsT9XGakS2jxDpNJ7991GKHlcRfjLG00N7inK3O6k RL8Z4zxOMljn++e1LEnOPkbCTOQRK1PrD/xtWIeKb+L6irEEDz/6B+Ya9MiQ800fRQSQ LqlTDpFk8n+bUCj6djNyiUzE+Na5dHYVIuO6I5lk7d0RNPso5C9QODkdIcCSmS5TLPMk Mb5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701447421; x=1702052221; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XSKzabyf617fM1KjEqCfZfHlIw32BDDg2adJnGl6QJ8=; b=uCBdc89554O/tXN3R8PjkRSSIo7znpKtJNFA+RCkzkM9mrtx6nXc8Gg/cT4x6+ZZdy FLMQ/+vOUBfbQrGmAMOaMIG5cA6lLtEONFmRGum0vnpPnhYDQjgH2DHLAywLYNvEGQ+n 5HREKZA+aB1Y20BsXiXiBoffY64bLbkeyvE8nzpDapIOOr6o8EVwDkzyG6Fq5S+Kgqwm kzbq+WdL02UvlKvEaj2wN4sQCUnotQXjg+zjI8+6clyjzLxqLbsg4rbZD4KPgNikYDJ4 UrfZgGd9Abou3EBiieDdUchu/GgmNYbMFmRFH8wGB+nGUFFd4cpnR3miJ6tQUjGF9C9d 4nVQ== X-Gm-Message-State: AOJu0YxbmQaV9cLkfJt9TEWmreYTW3v/6HtaMJ7mRn7RUg1B9737XWkE pz0R/ceYeLP61zxmGM/ynFZ/wg== X-Google-Smtp-Source: AGHT+IHjqFYkByXc9Gb3pcb1OogPS3f1+e4xDX/ps+5Ye1VAGcstpN9qt433fzLCKLTPnd9WoPHO1g== X-Received: by 2002:a05:600c:1615:b0:40b:5e56:7b5c with SMTP id m21-20020a05600c161500b0040b5e567b5cmr764423wmn.165.1701447420729; Fri, 01 Dec 2023 08:17:00 -0800 (PST) Received: from vingu-book.. ([2a01:e0a:f:6020:6db5:f04:fbd5:88e1]) by smtp.gmail.com with ESMTPSA id l27-20020a05600c1d1b00b003feae747ff2sm9591398wms.35.2023.12.01.08.16.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Dec 2023 08:16:58 -0800 (PST) From: Vincent Guittot To: mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vschneid@redhat.com, corbet@lwn.net, alexs@kernel.org, siyanteng@loongson.cn, qyousef@layalina.io, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org Cc: lukasz.luba@arm.com, hongyan.xia2@arm.com, yizhou.tang@shopee.com, Vincent Guittot Subject: [PATCH v2 1/2] sched/fair: Remove SCHED_FEAT(UTIL_EST_FASTUP, true) Date: Fri, 1 Dec 2023 17:16:51 +0100 Message-Id: <20231201161652.1241695-2-vincent.guittot@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231201161652.1241695-1-vincent.guittot@linaro.org> References: <20231201161652.1241695-1-vincent.guittot@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org sched_feat(UTIL_EST_FASTUP) has been added to easily disable the feature in order to check for possibly related regressions. After 3 years, it has never been used and no regression has been reported. Let remove it and make fast increase a permanent behavior. Signed-off-by: Vincent Guittot Reviewed-and-tested-by: Lukasz Luba Reviewed-by: Dietmar Eggemann Reviewed-by: Hongyan Xia Reviewed-by: Tang Yizhou Reviewed-by: Alex Shi Reviewed-by: Yanteng Si --- Documentation/scheduler/schedutil.rst | 7 +++---- Documentation/translations/zh_CN/scheduler/schedutil.rst | 7 +++---- kernel/sched/fair.c | 8 +++----- kernel/sched/features.h | 1 - 4 files changed, 9 insertions(+), 14 deletions(-) diff --git a/Documentation/scheduler/schedutil.rst b/Documentation/schedule= r/schedutil.rst index 32c7d69fc86c..803fba8fc714 100644 --- a/Documentation/scheduler/schedutil.rst +++ b/Documentation/scheduler/schedutil.rst @@ -90,8 +90,8 @@ For more detail see: - Documentation/scheduler/sched-capacity.rst:"1. CPU Capacity + 2. Task u= tilization" =20 =20 -UTIL_EST / UTIL_EST_FASTUP -=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D +UTIL_EST +=3D=3D=3D=3D=3D=3D=3D=3D =20 Because periodic tasks have their averages decayed while they sleep, even though when running their expected utilization will be the same, they suff= er a @@ -99,8 +99,7 @@ though when running their expected utilization will be th= e same, they suffer a =20 To alleviate this (a default enabled option) UTIL_EST drives an Infinite Impulse Response (IIR) EWMA with the 'running' value on dequeue -- when it= is -highest. A further default enabled option UTIL_EST_FASTUP modifies the IIR -filter to instantly increase and only decay on decrease. +highest. UTIL_EST filters to instantly increase and only decay on decrease. =20 A further runqueue wide sum (of runnable tasks) is maintained of: =20 diff --git a/Documentation/translations/zh_CN/scheduler/schedutil.rst b/Doc= umentation/translations/zh_CN/scheduler/schedutil.rst index d1ea68007520..7c8d87f21c42 100644 --- a/Documentation/translations/zh_CN/scheduler/schedutil.rst +++ b/Documentation/translations/zh_CN/scheduler/schedutil.rst @@ -89,16 +89,15 @@ r_cpu=E8=A2=AB=E5=AE=9A=E4=B9=89=E4=B8=BA=E5=BD=93=E5= =89=8DCPU=E7=9A=84=E6=9C=80=E9=AB=98=E6=80=A7=E8=83=BD=E6=B0=B4=E5=B9=B3=E4= =B8=8E=E7=B3=BB=E7=BB=9F=E4=B8=AD=E4=BB=BB=E4=BD=95=E5=85=B6=E5=AE=83CPU=E7= =9A=84=E6=9C=80 - Documentation/translations/zh_CN/scheduler/sched-capacity.rst:"1. CPU C= apacity + 2. Task utilization" =20 =20 -UTIL_EST / UTIL_EST_FASTUP -=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D +UTIL_EST +=3D=3D=3D=3D=3D=3D=3D=3D =20 =E7=94=B1=E4=BA=8E=E5=91=A8=E6=9C=9F=E6=80=A7=E4=BB=BB=E5=8A=A1=E7=9A=84= =E5=B9=B3=E5=9D=87=E6=95=B0=E5=9C=A8=E7=9D=A1=E7=9C=A0=E6=97=B6=E4=BC=9A=E8= =A1=B0=E5=87=8F=EF=BC=8C=E8=80=8C=E5=9C=A8=E8=BF=90=E8=A1=8C=E6=97=B6=E5=85= =B6=E9=A2=84=E6=9C=9F=E5=88=A9=E7=94=A8=E7=8E=87=E4=BC=9A=E5=92=8C=E7=9D=A1= =E7=9C=A0=E5=89=8D=E7=9B=B8=E5=90=8C=EF=BC=8C =E5=9B=A0=E6=AD=A4=E5=AE=83=E4=BB=AC=E5=9C=A8=E5=86=8D=E6=AC=A1=E8=BF=90= =E8=A1=8C=E5=90=8E=E4=BC=9A=E9=9D=A2=E4=B8=B4=EF=BC=88DVFS=EF=BC=89=E7=9A= =84=E4=B8=8A=E6=B6=A8=E3=80=82 =20 =E4=B8=BA=E4=BA=86=E7=BC=93=E8=A7=A3=E8=BF=99=E4=B8=AA=E9=97=AE=E9=A2=98= =EF=BC=8C=EF=BC=88=E4=B8=80=E4=B8=AA=E9=BB=98=E8=AE=A4=E4=BD=BF=E8=83=BD=E7= =9A=84=E7=BC=96=E8=AF=91=E9=80=89=E9=A1=B9=EF=BC=89UTIL_EST=E9=A9=B1=E5=8A= =A8=E4=B8=80=E4=B8=AA=E6=97=A0=E9=99=90=E8=84=89=E5=86=B2=E5=93=8D=E5=BA=94 =EF=BC=88Infinite Impulse Response=EF=BC=8CIIR=EF=BC=89=E7=9A=84EWMA=EF=BC= =8C=E2=80=9C=E8=BF=90=E8=A1=8C=E2=80=9D=E5=80=BC=E5=9C=A8=E5=87=BA=E9=98=9F= =E6=97=B6=E6=98=AF=E6=9C=80=E9=AB=98=E7=9A=84=E3=80=82 -=E5=8F=A6=E4=B8=80=E4=B8=AA=E9=BB=98=E8=AE=A4=E4=BD=BF=E8=83=BD=E7=9A=84= =E7=BC=96=E8=AF=91=E9=80=89=E9=A1=B9UTIL_EST_FASTUP=E4=BF=AE=E6=94=B9=E4=BA= =86IIR=E6=BB=A4=E6=B3=A2=E5=99=A8=EF=BC=8C=E4=BD=BF=E5=85=B6=E5=85=81=E8=AE= =B8=E7=AB=8B=E5=8D=B3=E5=A2=9E=E5=8A=A0=EF=BC=8C -=E4=BB=85=E5=9C=A8=E5=88=A9=E7=94=A8=E7=8E=87=E4=B8=8B=E9=99=8D=E6=97=B6= =E8=A1=B0=E5=87=8F=E3=80=82 +UTIL_EST=E6=BB=A4=E6=B3=A2=E4=BD=BF=E5=85=B6=E5=9C=A8=E9=81=87=E5=88=B0=E6= =9B=B4=E9=AB=98=E5=80=BC=E6=97=B6=E7=AB=8B=E5=88=BB=E5=A2=9E=E5=8A=A0=EF=BC= =8C=E8=80=8C=E9=81=87=E5=88=B0=E4=BD=8E=E5=80=BC=E6=97=B6=E4=BC=9A=E7=BC=93= =E6=85=A2=E8=A1=B0=E5=87=8F=E3=80=82 =20 =E8=BF=9B=E4=B8=80=E6=AD=A5=EF=BC=8C=E8=BF=90=E8=A1=8C=E9=98=9F=E5=88=97= =E7=9A=84=EF=BC=88=E5=8F=AF=E8=BF=90=E8=A1=8C=E4=BB=BB=E5=8A=A1=E7=9A=84=EF= =BC=89=E5=88=A9=E7=94=A8=E7=8E=87=E4=B9=8B=E5=92=8C=E7=94=B1=E4=B8=8B=E5=BC= =8F=E8=AE=A1=E7=AE=97=EF=BC=9A =20 diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index bcea3d55d95d..e94d65da8d66 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -4870,11 +4870,9 @@ static inline void util_est_update(struct cfs_rq *cf= s_rq, * to smooth utilization decreases. */ ue.enqueued =3D task_util(p); - if (sched_feat(UTIL_EST_FASTUP)) { - if (ue.ewma < ue.enqueued) { - ue.ewma =3D ue.enqueued; - goto done; - } + if (ue.ewma < ue.enqueued) { + ue.ewma =3D ue.enqueued; + goto done; } =20 /* diff --git a/kernel/sched/features.h b/kernel/sched/features.h index a3ddf84de430..143f55df890b 100644 --- a/kernel/sched/features.h +++ b/kernel/sched/features.h @@ -83,7 +83,6 @@ SCHED_FEAT(WA_BIAS, true) * UtilEstimation. Use estimated CPU utilization. */ SCHED_FEAT(UTIL_EST, true) -SCHED_FEAT(UTIL_EST_FASTUP, true) =20 SCHED_FEAT(LATENCY_WARN, false) =20 --=20 2.34.1