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 A0F76381AEC for ; Fri, 7 Aug 2026 14:41:34 +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=1786113711; cv=none; b=rvqLIDeLa+ME2Op3+HDY4AOJNDVCZFkQiSSh7/D72ME0ZFDz4+ZXbpUtvRrF10IB78xS9Z41KG8VGUdujp84mUK9V27sVfsQBniJU3s+v73x1Ul8bEpX/TiOpb+f4s0heb5dmU2V1Uskvrj6iYT0Ee8mQTk1uJw7Ajr71qBtyRo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786113711; c=relaxed/simple; bh=Y/56oPVEffBjxjNx1h3W7hMYUb1prIOk5BYimmeMUXk=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=JfEZA6imuEqJ845tODgidEgog9kx0DHtGfS7fT9urwXJXQRiP3BKuXsooeQcz8yjsFl/EeCZ83UX+50Phh6odTSms99Vci44H2Sf/g3cyhsmh4lmR1z1t+v2XJ93S2P4AlZs5xkL1lODopkVbdy+KAu8dRx3x8G2Q2UYHlIocx8= 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=inE+e8Zu; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=ks2S1i4R; 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="inE+e8Zu"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="ks2S1i4R" 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 677CgAhR643100 for ; Fri, 7 Aug 2026 14:41:30 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= sjt0nLmUyvEX6y/ApHEY54VT/ZTHOS9hutf9WJJqwBU=; b=inE+e8Zu3U2Owgqb RRZyczQhWDCJuW0ZbaXjYA93JFyksduCDH78lpaiXp00n0Q5J0Pd0dZ8mVAvYrrr jEdOCjIE61mT1LXwtZbNUUQdHHQoC3zKjYoC+31+ZxuIlZrQp8U9qQ8JMPKh2F8e /VrxAOk5NHw8nuBrY0GGKu+pLBqn7Wd99kHpbh13jAWg9ISNKoajtDJbO6KzZHyc KwLau6KKiMGJbM1h09xfB1WpLz3/PdUhNg9biLATmoDX6rjffoTQnkfOK2LeNWq8 lqf5HxqQYaflPkEJoLcwKS5ve3rwYgjPSPb0YuhwhO5FcCJvKTv4tWuZdRobLMHA ipYMOQ== Received: from mail-yw1-f198.google.com (mail-yw1-f198.google.com [209.85.128.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4fvy6jmbut-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 07 Aug 2026 14:41:29 +0000 (GMT) Received: by mail-yw1-f198.google.com with SMTP id 00721157ae682-81e7b95cd84so56887287b3.0 for ; Fri, 07 Aug 2026 07:41:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1786113689; x=1786718489; 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=sjt0nLmUyvEX6y/ApHEY54VT/ZTHOS9hutf9WJJqwBU=; b=ks2S1i4R8qeMyEqrHFqhERY2LMmU2kgHH08YS/h6jxoWuhKrOr4mhVEsVmegKrXSO0 4xrmTNdqW2gJKc69IdkIWATcpkvT8MA+kAjHxeJoncrgWQ7wEyQBiI85J+/ePsZ5Cwge /Sjt5Kw6bgrVSjrj4QAJcT1OFE08h72i/JOjcRqV6Q2w8FK31e1/e3+8MsXgq0U0Nt2n nBWn9qcYi+ak4VBOWG9eoXsQmuaNzv9wGY0OQ62poTZcaYUPCMK74L7quQt4b1p9llAk e9kn8NGjEebhed+8X7TKkDyOAHBSF+1uIXhGLckMuBZ1S2AuV5v91NH601enovQfAMKG 8NaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786113689; x=1786718489; 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=sjt0nLmUyvEX6y/ApHEY54VT/ZTHOS9hutf9WJJqwBU=; b=RdooMzw11n6nBQ9ADn2eWhY5dWVJcoYiNn2qK93c9KQs0VF66XgJpxeBBMejvv+svd 8er0BSryBWSzx85HtcKbHRnXTygv34aQHG96ZAb8LNolL2WeBcxhsPh+B77rdCRqs9B8 Di55ZuRrTx/GaRZyDImHZLAahBVHRRGQtJXqjNsFHkluq3GmcPrBHpGYlQqw0DwKA9fb jXpeFemb9FkPFNy9D0L4ZgG6aKLXWDnf6uAoPvxFp2fJ1kNyS89Y6tQiVZMDF2aaGNug NXKP/KnC+D2W2BEKDaVWveErZ9vEpIrmvWR5PQwVAAmrPbA/89fI9fDya3+v90oXByqw tMtA== X-Forwarded-Encrypted: i=1; AHgh+Rr4F1pW/Y1ByiEy8rFZ/HdYQbK+txzqnK5vNrfJM0V3wo0Fv3PctR4fL00+V9xBNhZB7hAWLJntUCUAkKo=@vger.kernel.org X-Gm-Message-State: AOJu0Yyc8VJ+yvUunmSchKRg0msyrd7Shx2hPH1p3JYYneTdmUAAVWmo ApjRbnZA+XUUbSOlfMgehRvSUcvQSoAVLqUJTZ1UuehuQwJiZakO3A00zlSqGuaUAuXDFaotnSF /d8+OaKNjwd6Zd0kY9M05WYlpVsmEkwmfP6Le3opEYhqikJgCrpav93hm4/JkKL1g49c= X-Gm-Gg: AR+sD10ZpRHeLuZgcdC36r9SRCgmW5nEHejMRoLjmNnKTBUeEn5U7HAQzTY/zbdiw2K EYYjZubL5j7LUklQrcT8jpVjg/188qA5W4EJW3jR1yyX0Yb2x8x9YjduhEAfH64kFy19y8Qclvd l/DVUR40MLlMB42alIUt7DFZEIzO8moTX+2k8IErnom+6TRc22rid+m07/Hp9MGiqw12VU1Jl9E 4rtQlGuozlamN+0b39U6GZEKuombGVYZtQGM5BdS46/h6Vrb+RhcJpw3x05Wn0TBKu7fw9Z7V6O YZt+BDt/aKSyrHHUeAeK3M1m/ICcQs5TjWfuhGwObpSLbsZpzqs7bmwxWBAMn/jfZMfGisfVyFa /UWp3YtjQA6FQTxgZZ1PtyIK0/izsEsvQsMC2CyQZUHDiDeEG0cyGLazKf77zgatDcIazkOdbPs Z7EgnKfnjEGLDmxAnNFw== X-Received: by 2002:a05:690c:111:b0:820:1251:d2c2 with SMTP id 00721157ae682-82445b54398mr18986157b3.28.1786113688550; Fri, 07 Aug 2026 07:41:28 -0700 (PDT) X-Received: by 2002:a05:690c:111:b0:820:1251:d2c2 with SMTP id 00721157ae682-82445b54398mr18985777b3.28.1786113687954; Fri, 07 Aug 2026 07:41:27 -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 00721157ae682-823f6a0f824sm10637287b3.42.2026.08.07.07.41.20 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 07 Aug 2026 07:41:26 -0700 (PDT) Message-ID: <5a0a9216-5dba-4b25-968a-353b30f642b5@oss.qualcomm.com> Date: Fri, 7 Aug 2026 20:11:19 +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 2/2] sched/cpufreq: Update schedutil's DVFS request to reach the boost frequencies To: Vincent Guittot , Christian Loehle Cc: rafael@kernel.org, viresh.kumar@linaro.org, mingo@redhat.com, peterz@infradead.org, linux-arm-msm@vger.kernel.org, juri.lelli@redhat.com, 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, Ionela Voinescu , Beata Michalska References: <20260806044230.909961-1-sibi.sankar@oss.qualcomm.com> <20260806044230.909961-3-sibi.sankar@oss.qualcomm.com> <7a4be9a1-4b00-49c4-bdbf-649268e78c7a@arm.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: AW1haW4tMjYwODA3MDExNSBTYWx0ZWRfX+SDWVudMWOzz IEXhH27bJsWblV0Kyolf+cmveifJMrT7h+NAL6GcSDdq7kcigFDHjOuJA15DQZBmR8weBOS/DQ6 U4vba4faY121eicaHxSk2xu4Un0h1FpJ4I6E0S9hPUExptUXXXWPKdDkHBv/ylCQW5KkLlctU/Q RllMcujI8+QFO40uF7ju8yI1DzQsvDKGSwS3+VO8SAKYh3XY+R/JirZv8Btn5ROfG10aLz4sagl 4pHmwkS5/u+FMJqTctsYBsbATPpGN/OlpA5W+23imiqdaH7/RZ65oRD8ACNh4iU4azwhmfNNxBd PV2nEi0gLK7+NKlcEUus+jHhfemz0yVYLaYpysiseQ0wi9jCgE+RMRRAyjlkDuFhpmcog0qm6Mo zDsH2yVHgVK9pUlJeZUvBF2rTc8kG39khZDTZbVMw8i2x6wuCZpA5PdRtu4H9dBtjV5LBG9y9yN N/GUnogq5856MXLl57A== X-Proofpoint-Spam-Info: AW1haW4tMjYwODA3MDExNSBTYWx0ZWRfX2Etu7i43Pnvm M4eXOJXaJ1HWZAjDvlicp+86c3MHZ2wJKer4t7s3KAuKL5HEjustT3NhDz82y5/k3Uo5+3LAX3q CfSCM9cCD1DvsyJpwISJ0qJaxZk2pOI= X-Proofpoint-ORIG-GUID: S0fsq0B4KyDFZLnYw74OZ1LLZyW9Pf9c X-Proofpoint-GUID: S0fsq0B4KyDFZLnYw74OZ1LLZyW9Pf9c X-Authority-Analysis: v=2.4 cv=e5Y2j6p/ c=1 sm=1 tr=0 ts=6a75ee99 cx=c_pps a=g1v0Z557R90hA0UpD/5Yag==: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=VwQbUJbxAAAA:8 a=7CQSdrXTAAAA:8 a=EUspDBNiAAAA:8 a=bYoXCjE1SysOf1r2alEA:9 a=QEXdDO2ut3YA:10 a=MFSWADHSvvjO3QEy5MdX:22 a=a-qgeE7W1pNrGK8U0ZQC: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_02,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-2608070115 On 8/6/2026 8:43 PM, Vincent Guittot wrote: > On Thu, 6 Aug 2026 at 11:02, Christian Loehle wrote: >> On 8/6/26 05:42, Sibi Sankar wrote: >>> 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_schedutil.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 = sg_policy->policy; >>> - unsigned int freq; >>> + unsigned int freq, ref; >>> >>> - freq = get_capacity_ref_freq(policy); >>> - freq = map_util_freq(util, freq, max); >>> + ref = 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. >> I'm not sure those two statements are compatible with the implementation below? >> util / max is expressed in the capacity scale established using ref, multiplying >> that ratio by policy->max changes the interpretation of every util value. >> >> >>> + */ >>> + freq = map_util_freq(util, max(ref, READ_ONCE(policy->max)), max); >> Isn't the underlying problem that schedutil can't handle requests above capacity 1024? >> >> effective_cpu_util() caps util at max, and sugov_effective_cpu_perf() applies >> the 25% headroom before clipping the result back to that same value. >> Therefore the input here cannot exceed 1024, and mapping it against ref >> can never request a frequency above ref. >> Using policy->max makes boost reachable, but also stretches the complete frequency range. >> For example, with ref = 4454400, policy->max = 4723200, and effective util 640, the request >> changes from 2784000 to 2952000. >> >> Making 'boost frequencies' truly compatible with schedutil (or PELT/CAS for that matter) >> is a discussion that is yet to be had? >> See also >> https://lore.kernel.org/lkml/20250626093018.106265-1-dietmar.eggemann@arm.com/ > cpufreq_pressure and freq_qos_update_request could handle the case > where boost freq is used as the ref freq when setting capacity but > disabled. I can't remember if everything was already in place when we > discussed this last time Christian/Vincent, Thanks, will look at how acpi-cpufreq/ccp-cpufreq in the x86 world handle this and try out some of the suggestions in the link and get back. >