Message ID | 20231211104855.558096-4-vincent.guittot@linaro.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp6957010vqy; Mon, 11 Dec 2023 02:49:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IGBOD+lYg42CScEhuaJuxQnyHXSR534FdmOcNtRBkc3OSP/kE3PiFCABNrTSSIaJglkaSZ7 X-Received: by 2002:a9d:6d02:0:b0:6d8:119d:a0a8 with SMTP id o2-20020a9d6d02000000b006d8119da0a8mr5175781otp.13.1702291774750; Mon, 11 Dec 2023 02:49:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702291774; cv=none; d=google.com; s=arc-20160816; b=ESnNWQk/nNwDFvzxDQPE72m9Zn8pHfx463s5Q0BGOP/wHpLoaBuWzVDGWPhdo7/U+u md/gL1hk5+ESGgw8fRGN6AzaQ3ZpMsoH+celFjH6Ff3hkYRPxw4skT8MkeUXpa3Wvsis /qDk/A4uTSI6QxP4dCl9tg30TOxtT97CEZTU8KPtHuVA1JGE5Tj7uKfOVBwmhKKsagp2 ifOjYs7NBHWSp+ARkai3Pv5Zd/wJ/h/WFElRkZb7y8/ektrvcdQFWkBnvkbCOxj/XFUH fQ1a5AejYEMPAAJmZJNELE+PhzcVzIki4N2N3OuVaAluBWginGKcT4VJplPNeixiylGQ nmtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=5RP/GniFhlk8mpJf3Vw6rSOsMkhpCi/hEV2/F0s2ZGQ=; fh=m1RMQkhqhelqGHSEjFmV3Y+WASpNyNPj5/fiCJx83/o=; b=tF9mPyUFvAcGjLl91GR4vgCisOaRrLpvfQqAwbvQ4GQloCWSfooayl5Fa+RN447rax gWyaEiwKlPA36nCxf4OVONdBq5Lmn7s0zB0kKmMt4mpiJq18D0fYkzeqt0TwhiswLmn2 8IneGae1oIkPgMQjSZ8r6bXhcGcjTb0slYgoEJeHPdaEGDv7QgFSrvTVp4K4cfrBAG0v DgLYrXmZXQjJctBE3xA8g0zwfEzDmyVat5Tnve7Qf3khZiYMswQ7HRD+jxgSeeDjfL9H QDKvSgVRVelodyzsqeRIfLBFNDLM1+AY+QSXOg1kU6bWrk8SKUH5KxVXgInCZh45WQo0 a8KA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UhOLaaMc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id 19-20020a631753000000b005c61d17e6aasi5948663pgx.122.2023.12.11.02.49.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 02:49:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UhOLaaMc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id B52E18043D03; Mon, 11 Dec 2023 02:49:31 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234477AbjLKKtG (ORCPT <rfc822;dexuan.linux@gmail.com> + 99 others); Mon, 11 Dec 2023 05:49:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234395AbjLKKtA (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 11 Dec 2023 05:49:00 -0500 Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2D5F3DF for <linux-kernel@vger.kernel.org>; Mon, 11 Dec 2023 02:49:06 -0800 (PST) Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-3334a701cbbso4484556f8f.0 for <linux-kernel@vger.kernel.org>; Mon, 11 Dec 2023 02:49:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1702291744; x=1702896544; 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=5RP/GniFhlk8mpJf3Vw6rSOsMkhpCi/hEV2/F0s2ZGQ=; b=UhOLaaMcg0rmnRaLEDJXXeGiigbuJe6gBK2wre5vXd8BjEH0gFa4mV0y8WRWp8fgar 5S/7lzfGGOoDQ5Ub9q3Yk9sNE+8iOvWoUP6rOzv6rMsKh+aX8RBaNsXRtnkJscZVQpc6 L3tb+yRuVRXabXk24VNxAY8WK0DpTituLryeqSmIicy/0Tky3vWtd5CWRKZol3I2guJx aIH707PW/2IOmmaWhey+Qu1+kLq90mwyLQnTyV6uQX1Q5QzIe4bvm3Qx4VfsUuK+VpDQ jkn5lrCHIvik5gTJYbsImgHDD7VPTFK1UVs99Onjw7W+mBQBi8zdob/WLyUQ6+Wd7ZHE iD6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702291744; x=1702896544; 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=5RP/GniFhlk8mpJf3Vw6rSOsMkhpCi/hEV2/F0s2ZGQ=; b=i5FUoYp5Zfk+NesmtDsj36MqtYG2EmWTA6fm/4AjRkCe7XtTdsJo/HM0O3ewM+LtQK bO74Pfaus80J9E3RAUA/mjLOfFxu+AmsPlHax/ETOHMyzmTII5bJthHz2eQMJo5GtyNO YcNVi5ilVOm6YmCLQZgdO23uElNbpfRy/dMgKVUS1n5amtMd3u2MddwBgGq4ImcIz8+B FMvbDSjRKCpyMrNMYZ4il5Y3/JhPpAITdAIJE3A3b9OwvsZXtydELLrt9aoAxw97EvXv Mo2RjPA4CJrHGzxQXxgrFAW02tI41O7p4kIgBMz1fn+gyRA5SMSTawCu/5FO5iBMq1Aw kngw== X-Gm-Message-State: AOJu0YxNT4/azqr5d8GaXVJs9YGavjImmWL5w6Ii5QTPRYYUd5SCAHub Cqvk3cQqqSZancCj2UZhCB+5DA== X-Received: by 2002:adf:eed1:0:b0:333:2fd2:3bd4 with SMTP id a17-20020adfeed1000000b003332fd23bd4mr1400970wrp.141.1702291744711; Mon, 11 Dec 2023 02:49:04 -0800 (PST) Received: from vingu-book.. ([2a01:e0a:f:6020:a8d:abc:f0ae:3066]) by smtp.gmail.com with ESMTPSA id e16-20020adffd10000000b003346db01263sm8232579wrr.104.2023.12.11.02.49.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 02:49:04 -0800 (PST) From: Vincent Guittot <vincent.guittot@linaro.org> To: linux@armlinux.org.uk, catalin.marinas@arm.com, will@kernel.org, paul.walmsley@sifive.com, palmer@dabbelt.com, aou@eecs.berkeley.edu, sudeep.holla@arm.com, gregkh@linuxfoundation.org, rafael@kernel.org, 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, viresh.kumar@linaro.org, lenb@kernel.org, robert.moore@intel.com, lukasz.luba@arm.com, ionela.voinescu@arm.com, pierre.gondois@arm.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, linux-pm@vger.kernel.org, linux-acpi@vger.kernel.org Cc: conor.dooley@microchip.com, suagrfillet@gmail.com, ajones@ventanamicro.com, lftan@kernel.org, beata.michalska@arm.com, Vincent Guittot <vincent.guittot@linaro.org> Subject: [PATCH v7 3/7] cpufreq/schedutil: Use a fixed reference frequency Date: Mon, 11 Dec 2023 11:48:51 +0100 Message-Id: <20231211104855.558096-4-vincent.guittot@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231211104855.558096-1-vincent.guittot@linaro.org> References: <20231211104855.558096-1-vincent.guittot@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Mon, 11 Dec 2023 02:49:31 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784982299808443709 X-GMAIL-MSGID: 1784982299808443709 |
Series |
consolidate and cleanup CPU capacity
|
|
Commit Message
Vincent Guittot
Dec. 11, 2023, 10:48 a.m. UTC
cpuinfo.max_freq can change at runtime because of boost as an example. This implies that the value could be different than the one that has been used when computing the capacity of a CPU. The new arch_scale_freq_ref() returns a fixed and coherent reference frequency that can be used when computing a frequency based on utilization. Use this arch_scale_freq_ref() when available and fallback to policy otherwise. Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org> Reviewed-by: Lukasz Luba <lukasz.luba@arm.com> Tested-by: Lukasz Luba <lukasz.luba@arm.com> Acked-by: Rafael J. Wysocki <rafael@kernel.org> Reviewed-by: Dietmar Eggemann <dietmar.eggemann@arm.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> --- kernel/sched/cpufreq_schedutil.c | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-)
Comments
On Mon, Dec 11, 2023 at 11:48:51AM +0100, Vincent Guittot wrote: > cpuinfo.max_freq can change at runtime because of boost as an example. This > implies that the value could be different than the one that has been > used when computing the capacity of a CPU. So, this seems very weird but I just finished a bisection of a failure that showed up during the merge window with the DT kselftests on meson-gxl-s905x-libretech-cc (Libretech Le Potato) running an arm64 defconfig. Looking at the commit this seems like a very surprising false result but I verified that the commit before this one runs fine and reproduced the failure, the bisect does seem to converge well also so it appears like there's something going on. Does this ring any bells for anyone? The test is timed out by the kselftest wrapper: kselftest: Running tests in dt TAP version 13 1..1 # timeout set to 45 # selftests: dt: test_unprobed_devices.sh # TAP version 13 # not ok 1 selftests: dt: test_unprobed_devices.sh # TIMEOUT 45 seconds with no obvious effect on the system, a successful run takes less than 20 seconds so it shouldn't be that the timing is marginal. I'm guessing that reading the one of the files under /sys/devices hung. No other boards in my lab are affected and I'm not immediately seeing anything remarkable about this board. Full log from a bad run at: https://lava.sirena.org.uk/scheduler/job/493329 and a good run: https://lava.sirena.org.uk/scheduler/job/492453 Bisect log (the skipped commits didn't build): git bisect start # status: waiting for both good and bad commits # bad: [4fbbed7872677b0a28ba8237169968171a61efbd] Merge tag 'timers-core-2024-01-21' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip git bisect bad 4fbbed7872677b0a28ba8237169968171a61efbd # status: waiting for good commit(s), bad commit known # good: [0dd3ee31125508cd67f7e7172247f05b7fd1753a] Linux 6.7 git bisect good 0dd3ee31125508cd67f7e7172247f05b7fd1753a # bad: [ba5afb9a84df2e6b26a1b6389b98849cd16ea757] fs: rework listmount() implementation git bisect bad ba5afb9a84df2e6b26a1b6389b98849cd16ea757 # bad: [de927f6c0b07d9e698416c5b287c521b07694cac] Merge tag 's390-6.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux git bisect bad de927f6c0b07d9e698416c5b287c521b07694cac # bad: [35f11a3710cdcbbc5090d14017a6295454e0cc73] Merge tag 'mtd/for-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux git bisect bad 35f11a3710cdcbbc5090d14017a6295454e0cc73 # bad: [d30e51aa7b1f6fa7dd78d4598d1e4c047fcc3fb9] Merge tag 'slab-for-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab git bisect bad d30e51aa7b1f6fa7dd78d4598d1e4c047fcc3fb9 # skip: [968b80332432172dbbb773e749a43bdc846d1a13] Merge tag 'powerpc-6.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux git bisect skip 968b80332432172dbbb773e749a43bdc846d1a13 # good: [372a34e66fb7f95124fadae9c600b231c35696a7] fs: replace f_rcuhead with f_task_work git bisect good 372a34e66fb7f95124fadae9c600b231c35696a7 # good: [ae24db43b3b427eb290b58d55179c32f0a7539d1] powerpc/ftrace: Remove nops after the call to ftrace_stub git bisect good ae24db43b3b427eb290b58d55179c32f0a7539d1 # skip: [3cf1d6a5fbf3f724d12b01635319924239d42c00] Merge tag 'm68k-for-v6.8-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k git bisect skip 3cf1d6a5fbf3f724d12b01635319924239d42c00 # good: [2a33e2ddc6ebf9b5468091aded8a38f57de9a580] splice: remove permission hook from do_splice_direct() git bisect good 2a33e2ddc6ebf9b5468091aded8a38f57de9a580 # good: [9b7e9e2f5d5c3d079ec46bc71b114012e362ea6e] fs: factor out backing_file_splice_{read,write}() helpers git bisect good 9b7e9e2f5d5c3d079ec46bc71b114012e362ea6e # good: [12c1b632d970c0138b4c5c65a1065e7d0604d272] fs: reformat idmapped mounts entry git bisect good 12c1b632d970c0138b4c5c65a1065e7d0604d272 # good: [d23627a7688fabff0096a7beaff1a93de76afaad] EDAC/igen6: Add Intel Raptor Lake-P SoCs support git bisect good d23627a7688fabff0096a7beaff1a93de76afaad # skip: [ab5f3fcb7c72094684760e0cd8954d8d570b5e83] Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux git bisect skip ab5f3fcb7c72094684760e0cd8954d8d570b5e83 # good: [eb183b2cd0a6549992eca3c4ada0b1bc1d9340f5] Revert "perf/arm_dmc620: Remove duplicate format attribute #defines" git bisect good eb183b2cd0a6549992eca3c4ada0b1bc1d9340f5 # good: [1ab33c03145d0f6c345823fc2da935d9a1a9e9fc] asm-generic: make sparse happy with odd-sized put_unaligned_*() git bisect good 1ab33c03145d0f6c345823fc2da935d9a1a9e9fc # good: [794c68b20408bb6899f90314e36e256924cc85a1] x86/CPU/AMD: Get rid of amd_erratum_1485[] git bisect good 794c68b20408bb6899f90314e36e256924cc85a1 # bad: [11137d384996bb05cf33c8163db271e1bac3f4bf] sched/fair: Simplify util_est git bisect bad 11137d384996bb05cf33c8163db271e1bac3f4bf # good: [9c0b4bb7f6303c9c4e2e34984c46f5a86478f84d] sched/cpufreq: Rework schedutil governor performance estimation git bisect good 9c0b4bb7f6303c9c4e2e34984c46f5a86478f84d # good: [599457ba15403037b489fe536266a3d5f9efaed7] cpufreq: Use the fixed and coherent frequency for scaling capacity git bisect good 599457ba15403037b489fe536266a3d5f9efaed7 # bad: [50b813b147e9eb6546a1fc49d4e703e6d23691f2] cpufreq/cppc: Move and rename cppc_cpufreq_{perf_to_khz|khz_to_perf}() git bisect bad 50b813b147e9eb6546a1fc49d4e703e6d23691f2 # bad: [15cbbd1d317e07b4e5c6aca5d4c5579539a82784] energy_model: Use a fixed reference frequency git bisect bad 15cbbd1d317e07b4e5c6aca5d4c5579539a82784 # bad: [b3edde44e5d4504c23a176819865cd603fd16d6c] cpufreq/schedutil: Use a fixed reference frequency git bisect bad b3edde44e5d4504c23a176819865cd603fd16d6c # first bad commit: [b3edde44e5d4504c23a176819865cd603fd16d6c] cpufreq/schedutil: Use a fixed reference frequency
Hi Mark, Could you tried this fix: https://lore.kernel.org/lkml/20240117190545.596057-1-vincent.guittot@linaro.org/ Regards, Vincent On Tue, 23 Jan 2024 at 02:55, Mark Brown <broonie@kernel.org> wrote: > > On Mon, Dec 11, 2023 at 11:48:51AM +0100, Vincent Guittot wrote: > > cpuinfo.max_freq can change at runtime because of boost as an example. This > > implies that the value could be different than the one that has been > > used when computing the capacity of a CPU. > > So, this seems very weird but I just finished a bisection of a failure > that showed up during the merge window with the DT kselftests on > meson-gxl-s905x-libretech-cc (Libretech Le Potato) running an arm64 > defconfig. Looking at the commit this seems like a very surprising > false result but I verified that the commit before this one runs fine > and reproduced the failure, the bisect does seem to converge well also > so it appears like there's something going on. Does this ring any bells > for anyone? > > The test is timed out by the kselftest wrapper: > > kselftest: Running tests in dt > TAP version 13 > 1..1 > # timeout set to 45 > # selftests: dt: test_unprobed_devices.sh > # TAP version 13 > # > not ok 1 selftests: dt: test_unprobed_devices.sh # TIMEOUT 45 seconds > > with no obvious effect on the system, a successful run takes less than > 20 seconds so it shouldn't be that the timing is marginal. I'm guessing > that reading the one of the files under /sys/devices hung. No other > boards in my lab are affected and I'm not immediately seeing anything > remarkable about this board. Full log from a bad run at: > > https://lava.sirena.org.uk/scheduler/job/493329 > > and a good run: > > https://lava.sirena.org.uk/scheduler/job/492453 > > Bisect log (the skipped commits didn't build): > > git bisect start > # status: waiting for both good and bad commits > # bad: [4fbbed7872677b0a28ba8237169968171a61efbd] Merge tag 'timers-core-2024-01-21' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip > git bisect bad 4fbbed7872677b0a28ba8237169968171a61efbd > # status: waiting for good commit(s), bad commit known > # good: [0dd3ee31125508cd67f7e7172247f05b7fd1753a] Linux 6.7 > git bisect good 0dd3ee31125508cd67f7e7172247f05b7fd1753a > # bad: [ba5afb9a84df2e6b26a1b6389b98849cd16ea757] fs: rework listmount() implementation > git bisect bad ba5afb9a84df2e6b26a1b6389b98849cd16ea757 > # bad: [de927f6c0b07d9e698416c5b287c521b07694cac] Merge tag 's390-6.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux > git bisect bad de927f6c0b07d9e698416c5b287c521b07694cac > # bad: [35f11a3710cdcbbc5090d14017a6295454e0cc73] Merge tag 'mtd/for-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux > git bisect bad 35f11a3710cdcbbc5090d14017a6295454e0cc73 > # bad: [d30e51aa7b1f6fa7dd78d4598d1e4c047fcc3fb9] Merge tag 'slab-for-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab > git bisect bad d30e51aa7b1f6fa7dd78d4598d1e4c047fcc3fb9 > # skip: [968b80332432172dbbb773e749a43bdc846d1a13] Merge tag 'powerpc-6.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux > git bisect skip 968b80332432172dbbb773e749a43bdc846d1a13 > # good: [372a34e66fb7f95124fadae9c600b231c35696a7] fs: replace f_rcuhead with f_task_work > git bisect good 372a34e66fb7f95124fadae9c600b231c35696a7 > # good: [ae24db43b3b427eb290b58d55179c32f0a7539d1] powerpc/ftrace: Remove nops after the call to ftrace_stub > git bisect good ae24db43b3b427eb290b58d55179c32f0a7539d1 > # skip: [3cf1d6a5fbf3f724d12b01635319924239d42c00] Merge tag 'm68k-for-v6.8-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k > git bisect skip 3cf1d6a5fbf3f724d12b01635319924239d42c00 > # good: [2a33e2ddc6ebf9b5468091aded8a38f57de9a580] splice: remove permission hook from do_splice_direct() > git bisect good 2a33e2ddc6ebf9b5468091aded8a38f57de9a580 > # good: [9b7e9e2f5d5c3d079ec46bc71b114012e362ea6e] fs: factor out backing_file_splice_{read,write}() helpers > git bisect good 9b7e9e2f5d5c3d079ec46bc71b114012e362ea6e > # good: [12c1b632d970c0138b4c5c65a1065e7d0604d272] fs: reformat idmapped mounts entry > git bisect good 12c1b632d970c0138b4c5c65a1065e7d0604d272 > # good: [d23627a7688fabff0096a7beaff1a93de76afaad] EDAC/igen6: Add Intel Raptor Lake-P SoCs support > git bisect good d23627a7688fabff0096a7beaff1a93de76afaad > # skip: [ab5f3fcb7c72094684760e0cd8954d8d570b5e83] Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux > git bisect skip ab5f3fcb7c72094684760e0cd8954d8d570b5e83 > # good: [eb183b2cd0a6549992eca3c4ada0b1bc1d9340f5] Revert "perf/arm_dmc620: Remove duplicate format attribute #defines" > git bisect good eb183b2cd0a6549992eca3c4ada0b1bc1d9340f5 > # good: [1ab33c03145d0f6c345823fc2da935d9a1a9e9fc] asm-generic: make sparse happy with odd-sized put_unaligned_*() > git bisect good 1ab33c03145d0f6c345823fc2da935d9a1a9e9fc > # good: [794c68b20408bb6899f90314e36e256924cc85a1] x86/CPU/AMD: Get rid of amd_erratum_1485[] > git bisect good 794c68b20408bb6899f90314e36e256924cc85a1 > # bad: [11137d384996bb05cf33c8163db271e1bac3f4bf] sched/fair: Simplify util_est > git bisect bad 11137d384996bb05cf33c8163db271e1bac3f4bf > # good: [9c0b4bb7f6303c9c4e2e34984c46f5a86478f84d] sched/cpufreq: Rework schedutil governor performance estimation > git bisect good 9c0b4bb7f6303c9c4e2e34984c46f5a86478f84d > # good: [599457ba15403037b489fe536266a3d5f9efaed7] cpufreq: Use the fixed and coherent frequency for scaling capacity > git bisect good 599457ba15403037b489fe536266a3d5f9efaed7 > # bad: [50b813b147e9eb6546a1fc49d4e703e6d23691f2] cpufreq/cppc: Move and rename cppc_cpufreq_{perf_to_khz|khz_to_perf}() > git bisect bad 50b813b147e9eb6546a1fc49d4e703e6d23691f2 > # bad: [15cbbd1d317e07b4e5c6aca5d4c5579539a82784] energy_model: Use a fixed reference frequency > git bisect bad 15cbbd1d317e07b4e5c6aca5d4c5579539a82784 > # bad: [b3edde44e5d4504c23a176819865cd603fd16d6c] cpufreq/schedutil: Use a fixed reference frequency > git bisect bad b3edde44e5d4504c23a176819865cd603fd16d6c > # first bad commit: [b3edde44e5d4504c23a176819865cd603fd16d6c] cpufreq/schedutil: Use a fixed reference frequency
On Tue, Jan 23, 2024 at 08:24:00AM +0100, Vincent Guittot wrote: > Could you tried this fix: > https://lore.kernel.org/lkml/20240117190545.596057-1-vincent.guittot@linaro.org/ That seems to fix the issue, thanks.
diff --git a/kernel/sched/cpufreq_schedutil.c b/kernel/sched/cpufreq_schedutil.c index 4ee8ad70be99..95c3c097083e 100644 --- a/kernel/sched/cpufreq_schedutil.c +++ b/kernel/sched/cpufreq_schedutil.c @@ -114,6 +114,28 @@ static void sugov_deferred_update(struct sugov_policy *sg_policy) } } +/** + * get_capacity_ref_freq - get the reference frequency that has been used to + * correlate frequency and compute capacity for a given cpufreq policy. We use + * the CPU managing it for the arch_scale_freq_ref() call in the function. + * @policy: the cpufreq policy of the CPU in question. + * + * Return: the reference CPU frequency to compute a capacity. + */ +static __always_inline +unsigned long get_capacity_ref_freq(struct cpufreq_policy *policy) +{ + unsigned int freq = arch_scale_freq_ref(policy->cpu); + + if (freq) + return freq; + + if (arch_scale_freq_invariant()) + return policy->cpuinfo.max_freq; + + return policy->cur; +} + /** * get_next_freq - Compute a new frequency for a given cpufreq policy. * @sg_policy: schedutil policy object to compute the new frequency for. @@ -140,9 +162,9 @@ static unsigned int get_next_freq(struct sugov_policy *sg_policy, unsigned long util, unsigned long max) { struct cpufreq_policy *policy = sg_policy->policy; - unsigned int freq = arch_scale_freq_invariant() ? - policy->cpuinfo.max_freq : policy->cur; + unsigned int freq; + freq = get_capacity_ref_freq(policy); freq = map_util_freq(util, freq, max); if (freq == sg_policy->cached_raw_freq && !sg_policy->need_freq_update)