From patchwork Sun Feb 4 14:09:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lizhe X-Patchwork-Id: 196506 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp370517dyb; Sun, 4 Feb 2024 06:10:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IF76mbFunkx1CvLfYtzVwnE/mb/jf1wRVm7ZYT8GcOyHPBKCQuuCHDFwU6K/bdtjifVJPsb X-Received: by 2002:a05:6512:31ca:b0:50e:a789:dd3b with SMTP id j10-20020a05651231ca00b0050ea789dd3bmr5093366lfe.1.1707055852802; Sun, 04 Feb 2024 06:10:52 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707055852; cv=pass; d=google.com; s=arc-20160816; b=uMpEHlKQNcvoxZlqNw+GI4pZfsyoiYrttSh2709a+U3kENJxRJvDUbFJQJQJMAb0iJ EiC7V8pelOo3cTAYxum8fa6SeRlVnOTPGsj9tnzhzg2XQ6/C+6c2QjP+icvONbuWTl2x 3D1J2+hBNG9dO1ibHR1xjIW+brB6RR6Ievdrg9kF/Q86hbRYktKPiXiFPmvia9taKKZ9 Dewuu4PgjtaaWVVLVw39Z4hQrP7Vwel6M0h2V7k2Zx/DJKIS2VtqZSpCfHqlNHi8cCl2 8L5m86A2FPEDBS9fRDfztPAzmhdPAOWwd3KmcfHysS6gYfCPnUFtAS+74HJYgM0/+Jcb g63A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=8jCHzQVqZeuBi19Um8vqUH+qUXm7myMsYA/bMP+Z8II=; fh=2emVPwHHlwL0fTaJBN0jZ0QEM6AH6is8ENR2XqKKP7Y=; b=waM0LHoWV0uQYg7yIjHuKl4R+5KWqywBsWo5NO6hOZT6NWwSmUfsk2bVNyWehobo1x +nTXVHti35jrgKcW5pZzfdj3BjPXJCuDXQVwFNkrPyMFtjeD2vpv8x2JjuJL4Wk5Z3aU GukaUvebFeJa5Tdq30I0prin2l8ulk3L2lBWmuYpsEYflPMJCexpUXb6KetuR0hPInBs jaRJGN+2RLiXOmDt2QSsn0WyDulsBux/iBrr9MwYEfHNDF942U+Ij/aGzu/o+7Ik3fc3 0OVIE4k/5b6iKrXIZAUVHhT3AaQGp+gco/bDX5RZWp5wXcHd6KQQDtamWn9buKtGZF1i DWNw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=poT+QR7r; arc=pass (i=1 spf=pass spfdomain=163.com dkim=pass dkdomain=163.com dmarc=pass fromdomain=163.com); spf=pass (google.com: domain of linux-kernel+bounces-51690-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51690-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com X-Forwarded-Encrypted: i=1; AJvYcCVZZnWdb5ewio6V1LYCLcq30RH9LafIBaArD2Pw4OwPSWMLQwsX2IVbk4Z6Qqo+atsKT1jkcEm/CbdLAKwmAOTr6roMlQ== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id gc22-20020a170906c8d600b00a35dd8d50e6si2828708ejb.468.2024.02.04.06.10.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Feb 2024 06:10:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-51690-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=poT+QR7r; arc=pass (i=1 spf=pass spfdomain=163.com dkim=pass dkdomain=163.com dmarc=pass fromdomain=163.com); spf=pass (google.com: domain of linux-kernel+bounces-51690-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-51690-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id E02901F21CE3 for ; Sun, 4 Feb 2024 14:10:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 48891225D9; Sun, 4 Feb 2024 14:10:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=163.com header.i=@163.com header.b="poT+QR7r" Received: from m15.mail.163.com (m15.mail.163.com [45.254.50.219]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 94A7B21340; Sun, 4 Feb 2024 14:10:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.254.50.219 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707055829; cv=none; b=RKyUOENnXLhFNyTwJplPk/MR9huiVRapEWuUIjdAcdaQrkRr/SnQZD+2kiCBYHHwk+5eTc51IhPmQN3S/ktdzihBEJ1FOER3JmeIHmtNRvU8LK7l42fVZdw3dt2aKIZb/+6whnQGwcUEaOfJOgWBlpVlkYLhHIkpQfIzTwMz0Cw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707055829; c=relaxed/simple; bh=cQod2kec5dLebpdvuIBrZKKCbKGaPXzQDdYDSwb8Ggg=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=bYyLslrl1CVzA8//WVqg5COwiNQXz7B1r0jEscrQzYwSLfHvbTXy/ZnPYA5NNjh3tsHxsgseUhisPl05qCEiUxWTLGWO46MCf6p2XNM8K462eEt6oHyIdswsDZ6DNNqKDQZC6/4+sTas8BzEoVR75igs34m63rnkNvpga8dTGj8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=163.com; spf=pass smtp.mailfrom=163.com; dkim=pass (1024-bit key) header.d=163.com header.i=@163.com header.b=poT+QR7r; arc=none smtp.client-ip=45.254.50.219 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=163.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=163.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=8jCHz QVqZeuBi19Um8vqUH+qUXm7myMsYA/bMP+Z8II=; b=poT+QR7rrL8PzvufQ57Jo Z1PLk6Ax6iu4u70MQIVsqm+7VIJpx2S0uI9hvItJHXA+yIAb5zchYAGWbPSUJOcL O9VdVmi0xTfB6QvoVnDHU7o37yLbujcJEn1/D8D9OBIjw5kdo0DcUCMki9GBlmtl x8pu7c4ppuJy5JwMzE3/TA= Received: from localhost.localdomain (unknown [114.98.57.142]) by gzga-smtp-mta-g0-3 (Coremail) with SMTP id _____wDHLymgmr9lRyxOBg--.39710S4; Sun, 04 Feb 2024 22:09:55 +0800 (CST) From: Lizhe To: vincent.guittot@linaro.org, ilpo.jarvinen@linux.intel.com, rafael@kernel.org, viresh.kumar@linaro.org Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Lizhe Subject: [PATCH] cpufreq/schedutil: When updating limitations, frequency modulation interval not become invalid. Date: Sun, 4 Feb 2024 06:09:28 -0800 Message-Id: <20240204140928.2865-1-sensor1010@163.com> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-CM-TRANSID: _____wDHLymgmr9lRyxOBg--.39710S4 X-Coremail-Antispam: 1Uf129KBjvdXoW7XrWrAr1rXFWfXr18AF1rtFb_yoWfGFg_Cr 1fWwsrXr45Aw1DKF1fuF4Fyr9Iv3W3WF1vvry0q39xt34UAryFyry8Jr18AFWfW340kF9r AryqgF15Cr4UGjkaLaAFLSUrUUUUjb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7sRWlkxJUUUUU== X-CM-SenderInfo: 5vhq20jurqiii6rwjhhfrp/xtbBXhZ6q2VOBWhgYAAAsf X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789977797721194291 X-GMAIL-MSGID: 1789977797721194291 If the current frequency scaling policy is schedutil. echo schedutil > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor This would result in an invalid frequency modulation interval. In sugov_limit(), sg_policy->limits_changed is set to true. Signed-off-by: Lizhe --- drivers/cpufreq/cpufreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 44db4f59c4cc..a0af38fcb7e2 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -2631,7 +2631,7 @@ static int cpufreq_set_policy(struct cpufreq_policy *policy, if (new_gov == policy->governor) { pr_debug("governor limits update\n"); - cpufreq_governor_limits(policy); + cpufreq_policy_apply_limits(policy); return 0; }