From mboxrd@z Thu Jan 1 00:00:00 1970 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 1620E466B47 for ; Fri, 7 Aug 2026 12:12:25 +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=1786104751; cv=none; b=Ujme5Xkgs3b4mKgwaHrN68DC1wtysd2fSnmrnSqSe53Sejs+CAXS5D7Fq0sTmD1nY+Lz28WBmWWu+RleQCQxxOS+cnoAuwU1Tx8F82IK8ZsQRbx0NBNfmLuu+yQoul86OwwfHuBQYV0amCp2zSYxYwIfk93gNgC9JfMYqNPohcQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786104751; c=relaxed/simple; bh=Bv/j3+YwE+jC2BUDvg+NvU+66yI03vLpRhssxggIxF0=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=eUl42Ta8lNfCf3wkbLBmau1DgupdUSWxOKGXtJfBb3j87qw3Ltx9OCop0ZhGPHRvoTjKDx/8kF72ITNKmTYl+nmbGsxWhATQJ9AsI0CDabD0DQqpV0qmL+IDF0vKO+W9umpoxOloNGK2DPSXrHv2lNFx6o9rkoVKdCmKuM6+IhE= 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=euKP463b; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=jdoS6/Bp; 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="euKP463b"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="jdoS6/Bp" Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 67781mkL3176962 for ; Fri, 7 Aug 2026 12:12:23 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= y7tni/GvmUJfIzIYK7psJJv8Q+0mTwBTdLTiDBhEsV8=; b=euKP463b2v6x2mgs wo4S4c9jAkmSalqftRXbR16ykaJxJrGY55EXK7yaYJN4PgRgD61t+hXC2dsZAbP+ Cv+5Km/KRpBDq4BjWF+w0e9kWqDmZr9WzyRr18bXZ2KAbh3kIUC1gZ3wD5GZTz5q rzHsxSyOIHM2Bdw6gigQvV9cqBWUlT+55nCj7JYYDYBkH4DNOxz7T/EFgDHsBxcs ev9VwcPAG8okvi0ZkJ5tYLxrFitYzIeDzEAPXIa5mZzztVMHQEAiwWUTHc538H7T 92cIHbzM7gYGej0rL7wjcdywVPn1fJBY31JyfOoofMIbyCYG1x41Z9/nupnZCqcf EwUnsg== Received: from mail-pj1-f69.google.com (mail-pj1-f69.google.com [209.85.216.69]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4fvy6jkr8t-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 07 Aug 2026 12:12:23 +0000 (GMT) Received: by mail-pj1-f69.google.com with SMTP id 98e67ed59e1d1-3811279d51aso5504957a91.1 for ; Fri, 07 Aug 2026 05:12:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1786104742; x=1786709542; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to :content-type; bh=y7tni/GvmUJfIzIYK7psJJv8Q+0mTwBTdLTiDBhEsV8=; b=jdoS6/BpFTbc27/zOY3xoRhis7e/OcYJVpUavq6gUFBP6m5y1FS9ksLqIt77En6kUH ckvJu5ULWmN/0MBeDv0pIv95vs4Tm9ja/LdoNNrhGCyUvqIFzmEp0CyG6bQNuMuT2aHa O7B0ilMAQHharXzUDB2NSL5jWTKu8p+qTRPEVKKeH6oRTmQKzCghnrl22nXagLGXePw9 Qn/KTt0qudjtU7Gf/ts/V6nfEQfs1HPh8teIwxFOfqyTnJbWCOYkm2o/1BaBKrilYqX9 jkE4kcuAFNU52oz25cpkkENGe11OPKSmhuiXNzmaJ4C5+FaSoxTMPX6qgAAvFeumKC7N rxCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786104742; x=1786709542; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=y7tni/GvmUJfIzIYK7psJJv8Q+0mTwBTdLTiDBhEsV8=; b=pj+GZ4t81Rw1OQ76eJw21c8V8pOVC4cxDOUg3lgTxTptbWkeae8u7JdaLj7YKxRVgC bASIM7ogXIdvH90FTk867B4PnmrM3bzQmtNjkFaDueSURy679VB9+0qHcAoQTJcQRlpV ZGlv3D3mrh5eWAV+qupBct1sP2ezHVjhIJYoIQHD7i86a7VwOlgIHTJjfKBJ2uDamMI4 sHjRR5NnqceI4scJSgsKCGik3QvIIZbo4mmaNFGftLuNOwFBnquOimQEiYFJhVE1mRbh v7tFZ52GZF43KCCV5GJgtDAXi/2e/g6ukOyqv5U6K4E4ksjSCC7lCHfUYHhrYXHWHCHb kRtA== X-Forwarded-Encrypted: i=1; AHgh+Roq2XAq8J/NrtDx1ZePzsot0VfM+/lGY/vJiYv9ZdhWRbQD8pvlLUp5GPzc5tAbU2+elDB2Z+GAzK7aldU=@vger.kernel.org X-Gm-Message-State: AOJu0YyMUPWg9Mn7VnPbUXP4jof9bBE/hojFvvLTQaqzAt2jwDAjE/vS SWIJ9+TERqgnRsj8WQOVnN6jHTER2oB7sYEoq8Lhlcrp9hDZkB0jxuJMx4A1mCK44KTLE7N7vvt g1SE7Hm2S1fuZDUQEsd/k23hthpwylv6fQZEXCE+AmADCxb6axGSUfnCH6K6YTyCtyGc= X-Gm-Gg: AR+sD13ofFNlcttfsIakP67mbBIFyjrk9Xgk8tMwuSEVm/XIJ0t56e3lIGaurt4cZdv LDgLhQqg1swcZFmvFS4ODM1XFpsPc1zoUU6v3Yzfk5nJVfnA9/aAdRAAHyFD6nrH7OjguTiyG6q b1DuSGQd06Zw8/Xu1RxsXIM7H1YMXTqyp8BqUOBIFQmRlLBAOl6raMCIokCfpKQwXyVl7DSC7A6 mLe1CK/wtvbGrUfxt1z1P2atb26anNzhWzVkewusi6JIVmFFjVjlEabnlp9W/FvOrwv20a12aB+ WoW9BuhT1P81vxOjB0AGHE/cnDPZUZQcUCtb2/XHNl2UShnhuMX3F4JpEtq+oPjNkNclt9B7CYw bv3e3/wJrGSyGkFCEGKn86bRSPcUYtBWgruAg5blguc7FTJr0+QwWks1pP8nfWjjVqkEpBLbdPj aPhpAHv+tmO6ZlNdvTUA== X-Received: by 2002:a17:90b:134f:b0:38e:488f:7068 with SMTP id 98e67ed59e1d1-39261f729d5mr3901647a91.2.1786104742401; Fri, 07 Aug 2026 05:12:22 -0700 (PDT) X-Received: by 2002:a17:90b:134f:b0:38e:488f:7068 with SMTP id 98e67ed59e1d1-39261f729d5mr3901577a91.2.1786104741939; Fri, 07 Aug 2026 05:12:21 -0700 (PDT) Received: from [10.190.200.255] (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com. [103.229.18.19]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3925fc6c13asm2440884a91.2.2026.08.07.05.12.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 07 Aug 2026 05:12:21 -0700 (PDT) Message-ID: <6d19e1e2-d1b3-4f33-8c18-4340edd6c567@oss.qualcomm.com> Date: Fri, 7 Aug 2026 17:42:14 +0530 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/2] cpufreq: allow cpuinfo max to decrease when boost is disabled To: Dmitry Baryshkov Cc: 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, 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 References: <20260806044230.909961-1-sibi.sankar@oss.qualcomm.com> <20260806044230.909961-2-sibi.sankar@oss.qualcomm.com> <35it74zycctxhpnbsuvp6a6aazrjavarhq43fqgruafjv7xkt2@recuceutrqrn> <42d9370b-aa10-4382-b6a2-bc441fd2335a@oss.qualcomm.com> Content-Language: en-US From: Sibi Sankar In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwODA3MDA5NSBTYWx0ZWRfX7ABkTjnr8zZm TbvwVLerqKK1gtzOZDpFo2Hu55wMvNJFYbF4DxRnx/yQURbHYwTYon3UsQ41oZTADfOhMdrX4/s Bimyy37y2joQU/twxFViZTNp7NQvbuesd+LoRxDCvwBfHUTeVV5pjEWjQ/uaZPdKHv1u4hKVLW5 I5tywbx/sv2fvyBx5aAZDU8C2Actz137mjoRjpSm3EgRv15bbjNd33oTcxRNR70iH0K/Q235nJY 89LtwdCEz07L8HNYGVDW4Lva+Ct0EsuPnO8zGPdQ6Mjz4gwAPMJJGKuHWROosdtPCR94925b5Zx f451gzC/wdd8s5NxHjZsKrePZtVAJpWEkNm9d9xMv5P5hfh2nJ+0lBwGibJVv9hr3T3+DAIKSor loAquijlgtS3KjeDl52sClG13+SBBB6wWhDdS1LSOCzJt5MDQiq73+kR1A1jFLCzIVEYg2snTjH PbDFSFwHa9hO+y7Y7sA== X-Proofpoint-Spam-Info: AW1haW4tMjYwODA3MDA5NSBTYWx0ZWRfX2wEKY+2vc0D/ VEqkU3fZfTPHhkuCCq4qR5/7MqMuq04KJ3ChumRNMtCoqshpfNNLWXDT/UuIA2sLf5P9C5j72Nv fSPNUzaT3L7wzM789W5C9QxgMBZwHhA= X-Proofpoint-ORIG-GUID: zrRxRgGN_HvqFJjyM0o0e28lG5vGiGhR X-Proofpoint-GUID: zrRxRgGN_HvqFJjyM0o0e28lG5vGiGhR X-Authority-Analysis: v=2.4 cv=e5Y2j6p/ c=1 sm=1 tr=0 ts=6a75cba7 cx=c_pps a=vVfyC5vLCtgYJKYeQD43oA==:117 a=Ou0eQOY4+eZoSc0qltEV5Q==:17 a=IkcTkHD0fZMA:10 a=Sv0fKeRqtYgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=YMgV9FUhrdKAYTUUvYB2:22 a=EUspDBNiAAAA:8 a=Bw_Xy2VeKd7xRC0kUEoA:9 a=QEXdDO2ut3YA:10 a=rl5im9kqc5Lf4LNbBjHf:22 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-07_01,2026-08-06_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 adultscore=0 spamscore=0 priorityscore=1501 impostorscore=0 bulkscore=0 lowpriorityscore=0 phishscore=0 suspectscore=0 malwarescore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2608070095 On 8/6/2026 5:42 PM, Dmitry Baryshkov wrote: > On Thu, Aug 06, 2026 at 03:41:45PM +0530, Sibi Sankar wrote: >> On 8/6/2026 2:58 PM, Dmitry Baryshkov wrote: >>> On Thu, Aug 06, 2026 at 10:12:29AM +0530, Sibi Sankar wrote: >>>> 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. >>> Why is this bad? >> Copy pasting logs shared from the cover letter: >> >> # cd /sys/devices/system/cpu/cpufreq/ >> # ls >> boost policy0 policy12 policy6 >> # cat boost >> 0 >> # cat policy6/scaling_max_freq >> 4454400 >> # echo 1 > boost >> # cat policy6/scaling_max_freq >> 4723200 >> # echo 0 > boost >> # cat policy6/scaling_max_freq >> 4723200 > How is this different from the maximum frequency being unavailable, for > example, because of the thermal pressure? It's certainly different because the maximum frequency is available in this case. Consider the following scenario where we use the performance governor with boost disabled -> enabled -> disabled. The governor would be voting for the max possible frequency, which is the boost frequency even when boost is explicitly disabled. # cat boost 0 # cat policy6/scaling_max_freq 4454400 # echo performance > policy6/scaling_governor # cat policy6/stats/time_in_state ... 4454400 377 4588800 0 4723200 0 # cat policy6/stats/time_in_state ... 4454400 480 4588800 0 4723200 0 # echo 1 > boost # # # cat policy6/stats/time_in_state ... 4454400 951 4588800 0 4723200 200 # echo 0 > boost # cat policy6/stats/time_in_state ... 4454400 951 4588800 0 4723200 1048 # cat policy6/stats/time_in_state ... 4454400 951 4588800 0 4723200 1115 Shouldn't this behavior be fixed? The boost flag and per-policy boost flag have no meaning otherwise. -Sibi > >> Currently disabling boost after enabling it is a NOP, >> scaling_max freq in this case would be pinned to turbo. >> It will be reachable through various govenors. Also policy >> specific boost flag is meaningless unless we have means to >> reduce the scaling_max_freq. >> >>>> 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 boost 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(-) >>>>