From nobody Fri Oct 2 02:30:27 2026 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AC6E8384CE8 for ; Thu, 6 Aug 2026 04:42:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785991366; cv=none; b=u574rCaQ4yH/KSlMeoS1UpogE04DE5pvveA6FsDBQq+IDO8c9OlxQ3mOFtKRF0g/AMdOBWhet9rhpcsckbOqiwNlLVCT+Roz/hdXp/D1VOcSVYm7R1ra3T0A6fK8ukNTwAetJTfKEqvU3XcKFrEfT5t5LetmwQqPoh9na3OvG1s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785991366; c=relaxed/simple; bh=KK5fOJv3HcE4z1ixBn/u7cnTTyKHDIYC3p/im5bWYUQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=jI1scu/hUHuAIxUjDCsW3tnzGQVA5gl2rPk5TvA7NUAlTwbjlbONoMStRHdQGXnp6bzxXAcrMowU4NTI5gXPKNV4vT72UT7Gx0pcbrcIuyVbxSx1d9YKvkmbt/GIXC1v8CWmoTGJIQW9sG+0AHAF1fAt4qjRzfhcSLaxIurQsMg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=L4KNEc3p; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=d8EOW0n+; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="L4KNEc3p"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="d8EOW0n+" Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 675Nb2p8266976 for ; Thu, 6 Aug 2026 04:42:45 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=Oz+Wc6Bsoqf slMI9UaiYcAde1YtVj4xAT63QnxB32cA=; b=L4KNEc3p9/E1GLx2B/KVClbUubl IsXHwNeLuoFn7qM9mq0xnjNXFQ8wqy0EBx0Zk4w2JOAdGHPo9IEYWjak0JQAe+R0 8+FvAoT7inqX5BjfhfIUqLRUtWBf1+0isj9zzFCt2zuKe0FclbzRPLo0jtJVKifD wspqWF3jU4SmX8cCjy98gREH90Fi2KTTYSQtaDHcOVrRMQE8UNqpv3mFw9BHF/9n qX4kkQgt6E4iMXivWaVHnMTh4tNNEN+DXU4Swe5PIv+QIclYIjDer45Kj1zeFLXs 8AjmElsyb8D2oiM6FlhlyofZZtRfYUTJFIsQgWPWY+3Jk+wdjAYsLPfo4uQ== Received: from mail-pl1-f198.google.com (mail-pl1-f198.google.com [209.85.214.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4fv3w6c2yg-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 06 Aug 2026 04:42:44 +0000 (GMT) Received: by mail-pl1-f198.google.com with SMTP id d9443c01a7336-2cacf17c7e0so24969095ad.0 for ; Wed, 05 Aug 2026 21:42:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1785991364; x=1786596164; 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:content-type; bh=Oz+Wc6BsoqfslMI9UaiYcAde1YtVj4xAT63QnxB32cA=; b=d8EOW0n+4+F8HgW5D1w7qJsr4a+DAkn2NXyyYkefGcUdXCd1f+WPkJz8vi+5+BBUli AJoSHYC3/p8hww5JNxf4VMYCo15Ca2h1gV9JjwKcJgNGxM6wMsmQ8aH8iQA2XfuEZMgp gByJQFmTToFt8SvC4JUrzL/5z9pCANOCio3AVw+u3Lu9Oe4KgXnpvRg+aFd8t35Vx84+ V7Ubks5sA0eZkN75y06YSFJw6JGhbWUYBSrIZrVnfX9elydwcXfWOzr95ocS5kPnlIs8 Rj5Fzj9ZDTfQeJ6RYDpb1Z+OXaMucbdjslPGE5jKhtmwpg+YX+XylQKNRS8HZptuplur EhPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785991364; x=1786596164; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=Oz+Wc6BsoqfslMI9UaiYcAde1YtVj4xAT63QnxB32cA=; b=sizkWqovp0T5Nakg3UZ7Suq8XSX0VfMnB3B8ymffWan3OxCsOCqXZkCkkkTwPAyWv2 iRsay9MmtoPryliB6TW1yFxo7rNzWQQ64rNFbBaj57VEE66UbD3demxgXfMy68EFUH/b F0kfS7awEnhbG6PxU6HPkyc9wbJR3kwd8df7Sv2EVLMUlwq1+GbOyurERYcDaptKUm9E TqW2rJezQvKNaAtdpOXbx8zFOYHSALE/sPJ+WTgXOuxcxgug0GDXzW2LRd4xMtrEt2a8 uqoBGhz24RcZek7uAGLqYkMI4f++czTW53HBjipX0EZQrGGhaR49zPv9Swv+1NkSHI6E 6yTQ== X-Gm-Message-State: AOJu0Yz7ScV9eLJyz3D1V4Dt6356JGjFcS4g7wmhyCrBFQpfz34DZwqG icsR9xvE+YqarJ0KyTm8sN2+aM/K9bQa6QSmC6NplHmTZ1gXxXvqc5YyVTW/DgUkVGqaFcPbyP4 3s32uUWYHqAZOpUc6NrwWL+MTP1FIoj4wxtYJRCeosJmmk6PYYJu/jPXspxDX5PQh6Ig= X-Gm-Gg: AR+sD102BjrV7xSzkH7xdoIpOg+8y5orDzy8WCP6zuyytTRALD3eTBhO4+1ESLnQdDY 4D7/e7dP/bo9sbeQhne+AGnwHxkUaAj1qNM5BGcZDPUQzLeLnqFmOkU9go6MhIzNMpS1jLpTkRc eM42/FbX5E1/J6oB9zvrLojyBi9ZQESwp4NtLYoHaLbNt7LvNWuA70fa7KfoLGRBFPeeDqzqcCM dDk2lijyLxg28rQZ25rPGAeygdWHP49EmdUATIdEJGAtwaiD9OdrIvnnohEWGiyaHuQPJsyrQap +D07x/6l9dh5Ro8TyQUfEqL97kmkPVUU75zvfgK3LoCftjFy3Cse0HI5+7ntmo4+eZpUdXaRmnc j7rHIM2xedMmatmf8z3uts5Oxmp2vF8Jh/Lm1WVTxXZKd4JAN1Nbg0P+e1K7XNPW30DeeSaCMEq ntkqQV9C1f0a7rNp0= X-Received: by 2002:a05:6a20:cc0e:b0:3c4:3672:ba6 with SMTP id adf61e73a8af0-3cb85efabd0mr14830164637.22.1785991364311; Wed, 05 Aug 2026 21:42:44 -0700 (PDT) X-Received: by 2002:a05:6a20:cc0e:b0:3c4:3672:ba6 with SMTP id adf61e73a8af0-3cb85efabd0mr14830111637.22.1785991363750; Wed, 05 Aug 2026 21:42:43 -0700 (PDT) Received: from hu-sibis-blr.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com. [103.229.18.19]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-31586402e53sm32643473eec.11.2026.08.05.21.42.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Aug 2026 21:42:43 -0700 (PDT) From: Sibi Sankar To: rafael@kernel.org, viresh.kumar@linaro.org, mingo@redhat.com, peterz@infradead.org, linux-arm-msm@vger.kernel.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com Cc: linux-kernel@vger.kernel.org, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, vschneid@redhat.com, kprateek.nayak@amd.com, linux-pm@vger.kernel.org Subject: [PATCH 1/2] cpufreq: allow cpuinfo max to decrease when boost is disabled Date: Thu, 6 Aug 2026 10:12:29 +0530 Message-Id: <20260806044230.909961-2-sibi.sankar@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260806044230.909961-1-sibi.sankar@oss.qualcomm.com> References: <20260806044230.909961-1-sibi.sankar@oss.qualcomm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-GUID: 2G0Le2CLYYwdyZlFshyrM8o_hahNWklO X-Proofpoint-ORIG-GUID: 2G0Le2CLYYwdyZlFshyrM8o_hahNWklO X-Authority-Analysis: v=2.4 cv=a48AM0SF c=1 sm=1 tr=0 ts=6a7410c4 cx=c_pps a=MTSHoo12Qbhz2p7MsH1ifg==:117 a=Ou0eQOY4+eZoSc0qltEV5Q==:17 a=Sv0fKeRqtYgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yOCtJkima9RkubShWh1s:22 a=EUspDBNiAAAA:8 a=OnsR6Khfw191TVAs058A:9 a=GvdueXVYPmCkWapjIL-Q:22 X-Proofpoint-Spam-Info: AW1haW4tMjYwODA2MDAzMiBTYWx0ZWRfX/42g4XjnDzPA uw+Y50lzmdd7r8+qG8aqHKgtwaqOmM/u/YztbB/b+vwgkpq/ijiBfHm7BYXwb7fCbmi+LZGSObn 7f7snYNcK9G489yfU8Da17OHsH/RBeM= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwODA2MDAzMiBTYWx0ZWRfX9OHswCM/D0IT Ujv7t94/0/OBVD3XWpjk/nBtSzPLVONylL1c1kQb+pKlF9WjNZN80HQn7uKG2xCNiNUvJ7gOKIM echuSUl5pnN2eJtesJY7DisxDS14pJwzNN2s0dRIsHXqQE5zTcFiB4EOy6ajqSHIz1hwSygH84y ak5wtpnwVdfM8Hz5W9VaPyXzvMp82RWDWV8zubnFzCAQ6pZbijP9FJkJ3erc5mdBMm321yhqna5 ra/7455P/lAdGPNVP7oWJv8C7c+EjJrshZ94dCbQ/+8rv4yJlquqnCY9zvdAHrZCPC3cwf0SIUV lRPkoh+4FpJIuirGBH07HRBRAzVNkI5VVEuzn2OlOBSjUUDdZz5fDWJNYeFnGgZ2DbHqCThQsgH Zc6t0mcI9WjStWGX9DAA4mbdaAuq3cXY57Z+RIA8kHMEwfxM620M4RMJjLX8DDtebCb/wFzrEzd +8ah7eXIH6v0zc52A/w== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-08-05_06,2026-08-05_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 clxscore=1015 suspectscore=0 spamscore=0 phishscore=0 adultscore=0 malwarescore=0 lowpriorityscore=0 priorityscore=1501 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2608060032 Content-Type: text/plain; charset="utf-8" From: Ananthu C V Commit 538b0188da46 ("cpufreq: ACPI: Set cpuinfo.max_freq directly if max boost is known") guarded cpuinfo max updates to only allow increases, preserving values set directly by drivers above the freq table maximum. This prevents cpuinfo max from decreasing on boost disable, leaving policy max pinned at the boost ceiling. Remove the guard so cpuinfo max is always derived from the frequency table scan. Drivers that correctly flag boost entries are unaffected since the scan already excludes them when boost is off. Fixes: 538b0188da46 ("cpufreq: ACPI: Set cpuinfo.max_freq directly if max b= oost is known") Signed-off-by: Ananthu C V Signed-off-by: Sibi Sankar --- drivers/cpufreq/freq_table.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/cpufreq/freq_table.c b/drivers/cpufreq/freq_table.c index ea994647abc8..791118466ca4 100644 --- a/drivers/cpufreq/freq_table.c +++ b/drivers/cpufreq/freq_table.c @@ -50,12 +50,7 @@ int cpufreq_frequency_table_cpuinfo(struct cpufreq_polic= y *policy) } =20 policy->cpuinfo.min_freq =3D min_freq; - /* - * If the driver has set its own cpuinfo.max_freq above max_freq, leave - * it as is. - */ - if (policy->cpuinfo.max_freq < max_freq) - policy->cpuinfo.max_freq =3D max_freq; + policy->cpuinfo.max_freq =3D max_freq; =20 if (min_freq =3D=3D ~0) return -EINVAL; --=20 2.34.1 From nobody Fri Oct 2 02:30:27 2026 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 437A0384CC4 for ; Thu, 6 Aug 2026 04:42:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785991372; cv=none; b=ip6KW31rq7Sw4fn+ZVDmD2njN2ynZ4LCQRH+sCtsMDro9O3csRAJ1t7TsnUPxx2bocb05gC2fjkut6ykDu1KNU565F4mQaPJsUZ1QeqHlb/fM8sJSCImGdgKac/AGTNp6GpQKR42LJXHG/aBGPzW27lcxzznvtI2OdzenY7v1QY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785991372; c=relaxed/simple; bh=suOz/Hx7XUoXe4sS9JmcD+pnA/MA8fwNnKj/ilaZHZI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=RcTnHHuiTYhe80obxL5aaKlYLYdu84p/Bs1IwlfEKQp95L4UHAYEKJi7k6biHXinUUIBybM3boHwC42O28Vt4KKdfLJpqcneMktjJ2jEGumnCMmod25VQvvf9U6h03LW6bCi9LKGBiJdXtrTbIYv3M5cuSRYc8X3MezU3FdnMpo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=cXa8vCWm; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=B2kkXGQc; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="cXa8vCWm"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="B2kkXGQc" Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 675NbGg7267138 for ; Thu, 6 Aug 2026 04:42:50 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=2i4Uj4137KW y44soo5k/hNh4LVeKysh+1efT4S0lnOY=; b=cXa8vCWmhBMHedHJ9i5NLPuzQ/L pZBGNdjsolj8i1Ealyh+p00B2a8aBiW6kFAkxK8B6yXhiIj3ViA2798ngX+IIqmY DlIzociM5yNKunNCYqEfAp2sbZAl8tXXkDkorwLallXMQ2wMQFZogUIM7woG8lsS OLADrq0pdjCrEBLJe45XRJxHBudg6K4VjTXgpPy/G9dHeYoTm49bEOBMFuR83c/o nkYeHkXnszDNmVDioSWotbrYp4T+dMn6b12FByB2OBSVgbXNbevuvmyO0lt280Fr oBkXiGdWb8MwjtWhM7Us+ePKOXu5WBzWbetBQOOk+xJ2QS6nXswMhMCWNGA== Received: from mail-pl1-f198.google.com (mail-pl1-f198.google.com [209.85.214.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4fv3w6c2ys-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 06 Aug 2026 04:42:50 +0000 (GMT) Received: by mail-pl1-f198.google.com with SMTP id d9443c01a7336-2cfbf3e4a63so45614005ad.0 for ; Wed, 05 Aug 2026 21:42:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1785991369; x=1786596169; 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:content-type; bh=2i4Uj4137KWy44soo5k/hNh4LVeKysh+1efT4S0lnOY=; b=B2kkXGQceo4Q3qcR22rcC/XHNvYy7wNYdpNammO34FRMkpX8gn8z2oVXUCNb8Ho+Uk KwMsFydwD81Nhl73LNwInhGnDHWOan1LSAvo/ZGuUlaK1P1iKHnbBxdKVklguANEZhf9 r7+RkmBHHF+4l9Yep7CXu0e8d+iHG7qQuN563gZi6xwIsXWKzr0kUO4p+q3rrYPc6iQ3 uL1BnFXlM7mOeEtswaz+JIds+KWea5lVuj6gCgoVpX6Yi+uV+UWTYbL+0NgNsAmx/fvL PLc+kCge85KzkliWNB5UJeX6PATqDLZVJicIFYv3oiPXGGSHubaXtQUIhHVzxB1WVh/A YDLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785991369; x=1786596169; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=2i4Uj4137KWy44soo5k/hNh4LVeKysh+1efT4S0lnOY=; b=nOx138WcHhZ7lxn4TRS5Mqhf7FDVo4ZtUsQpOEZIw0qKk9f90cABx/HuwqCwLZRKNM TksPaj2xCAzTqHSnqaUXZ7OS8MUhEyJA7r1ovE7g0DZfGWrLipc32YU4hz4rbjgRH20X /cYm8vGWBLIIkNqHfhV57jmWTFhuPzdp4Fy9jOkKK0wHnFpepAzQnPgN/N8cNFCvXkgX HxI+6Ga+ieByFXagPjCeiICU2WFb2hTPAr/KQAGS7ki4/ZUL4dMkI8seQcpWDWx8GoiJ rERahlxMXc2iQmWNHldaA8v0257KMn3mUpYtTnT8VqDiLDkTvO9nTZgI6pt+bKSoUkKa /Wdw== X-Gm-Message-State: AOJu0YyciF2ONryv+zw5IowGmqUe+V6UKUJIjEKPOJeVFnsa6tL9cm+v NFz5j3BlQ+5D6uInG74gUK1UjaP17I+aqmUTmNW/q7z4eRuWwDTOE/LO9gQ7eZXqPttyBTzqT7S GGwT0ZT7GHRdWDWEpM0/5i5l+Zgk/EEPopLKgj+NmYSlalQg3FGEK9f7tQVacl6PLdmo= X-Gm-Gg: AR+sD13qeXdnCrsGpRPmoh2QQoDpRXf6T6Kbdny1cDzZz/OW6MkE3i6zxqOJ/guA/5X OzaxCRYb7/Psp4nBiwKSD5E7w/JBal7jRyIpVMQEFO26CCHqFV9hi4liZ5sTAreMBCd4R5S1XIc scLuOkrmE6qxkTUERCMhEqKPOHD9CphbqverGnXq5oAtESz+/uobTq26WZGz3hzXx2Bkgd26sQ6 jFhGoSfkVQDFnnpzw90GNyRXoIEPaC/8dl21V7e2X7gksMHjx53ErNwygw3LkqkMzEPcbVGccsR Ze0uQYfzfORMZXSvjCowRDadO3Lzaui2apQY1qk4nsm6xMHYLz/FYFMIqSirupZOczvUvmUiFVv z61/IchjiT6Is9X28nWOPVXCkmZdrx15dScEuS8BM/sAfSquSgi6b/LVLa/TbFAV/zqy+Bj62jt Iq0j1WM/pY8/fUQMc= X-Received: by 2002:a05:6a21:329d:b0:3c3:8ead:6df0 with SMTP id adf61e73a8af0-3cb85ea6f8fmr12556542637.28.1785991369539; Wed, 05 Aug 2026 21:42:49 -0700 (PDT) X-Received: by 2002:a05:6a21:329d:b0:3c3:8ead:6df0 with SMTP id adf61e73a8af0-3cb85ea6f8fmr12556503637.28.1785991369071; Wed, 05 Aug 2026 21:42:49 -0700 (PDT) Received: from hu-sibis-blr.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com. [103.229.18.19]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-31586402e53sm32643473eec.11.2026.08.05.21.42.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Aug 2026 21:42:48 -0700 (PDT) From: Sibi Sankar To: rafael@kernel.org, viresh.kumar@linaro.org, mingo@redhat.com, peterz@infradead.org, linux-arm-msm@vger.kernel.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com Cc: linux-kernel@vger.kernel.org, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, vschneid@redhat.com, kprateek.nayak@amd.com, linux-pm@vger.kernel.org Subject: [PATCH 2/2] sched/cpufreq: Update schedutil's DVFS request to reach the boost frequencies Date: Thu, 6 Aug 2026 10:12:30 +0530 Message-Id: <20260806044230.909961-3-sibi.sankar@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260806044230.909961-1-sibi.sankar@oss.qualcomm.com> References: <20260806044230.909961-1-sibi.sankar@oss.qualcomm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-GUID: bhfIA0nG8dsPAadaX7oF_rtCzTGJ_Zcj X-Proofpoint-ORIG-GUID: bhfIA0nG8dsPAadaX7oF_rtCzTGJ_Zcj X-Authority-Analysis: v=2.4 cv=a48AM0SF c=1 sm=1 tr=0 ts=6a7410ca cx=c_pps a=MTSHoo12Qbhz2p7MsH1ifg==:117 a=Ou0eQOY4+eZoSc0qltEV5Q==:17 a=Sv0fKeRqtYgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yOCtJkima9RkubShWh1s:22 a=EUspDBNiAAAA:8 a=uMDrv-Gue8sy1whakgkA:9 a=GvdueXVYPmCkWapjIL-Q:22 X-Proofpoint-Spam-Info: AW1haW4tMjYwODA2MDAzMiBTYWx0ZWRfX0T2ds0KkEbse +ic+nF+giU6q2CRI8O0YyC6WtWxMqduDJmzbQjMPEHk8zfAmbpeY/P1UzCmrdUoCFSd8T9sxIN4 BsQnMbSZ+OzxaxUl8FAUNppqMkUnmyc= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwODA2MDAzMiBTYWx0ZWRfX/l50Q01EUN0E 6qSREa1llOsmg9cGV778wj45IkVLFkDRy92K9hYlG4+y3tpGnHFETvhBwLE9Lm22uqu9Ule4nr4 QI8IdQiN0ZK8YQ5QPZ2glCClj0MNCpORYMAk4xV0HNtZjRCodW3oNAeWbBtuApheV4izloZYmtV Xxfzeck5HbN73cIvIge5FuyMxAL2v/BbP3WIJviNoFSW3VDDvQwF70hDwHo/zJ1eVsREXY2AAS6 Bx6kFHLrNu3UoIZhx86/DUCSr4w2TdkCdjDI6TFfvc+zzL6EU457MHjuy+I1CC6TF6OD9k6ABHd XB/F310Qmu08LpMIIyh5hxUQIdi9vj1Jf5boa1IU8S8R6sUjybqOWOtDWqx1z2TxKAWnLAns1ZS TDVaVlrjrtWReADo6yng2ajNSdUmWd4LEcoG2MBpSBaVT6RFGRfQHX1v/gM2VYgilwgfKO9TKCu AnUh08fypOUE75oB0Qw== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-08-05_06,2026-08-05_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 clxscore=1015 suspectscore=0 spamscore=0 phishscore=0 adultscore=0 malwarescore=0 lowpriorityscore=0 priorityscore=1501 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2608060032 Content-Type: text/plain; charset="utf-8" capacity_freq_ref, exposed to schedutil via get_capacity_ref_freq(), was introduced by commit 9942cb22ea45 ("sched/topology: Add a new arch_scale_freq_ref() method") as a fixed anchor that does not move at runtime. However, schedutil uses that same fixed anchor as the reference plugged into map_util_freq() which saturates exactly at capacity_freq_ref. As a result, a system with cpufreq boost enabled effectively never runs at boost frequencies under schedutil-governed load. Fix this by plugging in policy-max into the map_util_freq equation, so that the DVFS requests translates to the actual cpufreq driver ceiling. Signed-off-by: Sibi Sankar --- kernel/sched/cpufreq_schedutil.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/kernel/sched/cpufreq_schedutil.c b/kernel/sched/cpufreq_schedu= til.c index a1782755efcc..dcefbeaa0702 100644 --- a/kernel/sched/cpufreq_schedutil.c +++ b/kernel/sched/cpufreq_schedutil.c @@ -195,10 +195,17 @@ static unsigned int get_next_freq(struct sugov_policy= *sg_policy, unsigned long util, unsigned long max) { struct cpufreq_policy *policy =3D sg_policy->policy; - unsigned int freq; + unsigned int freq, ref; =20 - freq =3D get_capacity_ref_freq(policy); - freq =3D map_util_freq(util, freq, max); + ref =3D get_capacity_ref_freq(policy); + + /* + * That fixed anchor governs how utilization is interpreted, but + * the DVFS request is free to target the current policy ceiling. + * Using ref alone would saturate the util->freq map at ref so + * use policy->max to reach boost frequencies. + */ + freq =3D map_util_freq(util, max(ref, READ_ONCE(policy->max)), max); =20 if (freq =3D=3D sg_policy->cached_raw_freq && !sg_policy->need_freq_updat= e) return sg_policy->next_freq; --=20 2.34.1