Message ID | 20240117110443.2060704-1-quic_sibis@quicinc.com |
---|---|
Headers |
Return-Path: <linux-kernel+bounces-28879-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:42cf:b0:101:a8e8:374 with SMTP id q15csp830948dye; Wed, 17 Jan 2024 03:05:35 -0800 (PST) X-Google-Smtp-Source: AGHT+IGWtmfPPu7dMbvIGKDq2INZI/AgUAG5odz4H1QSw2B11HfNtyJ6iVt2MlMXAhwjq48robe+ X-Received: by 2002:a0c:b691:0:b0:681:781a:8aca with SMTP id u17-20020a0cb691000000b00681781a8acamr1325522qvd.90.1705489535180; Wed, 17 Jan 2024 03:05:35 -0800 (PST) Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id f3-20020a0cf3c3000000b00681859a7a80si183644qvm.495.2024.01.17.03.05.35 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 03:05:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-28879-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=c9mXE4n+; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-28879-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-28879-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 003641C20FD1 for <ouuuleilei@gmail.com>; Wed, 17 Jan 2024 11:05:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 25FC71DDFA; Wed, 17 Jan 2024 11:05:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="c9mXE4n+" 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 2A0711CF8C; Wed, 17 Jan 2024 11:05:12 +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=1705489514; cv=none; b=XV1oaI0nJb8y5+DQCDA+llnZ7sI2fh/SF3eUAuuTQaft9VGM/jGGncYvjA1tqoYfBmPRlgynJdZGsYhKaeHFEaDzm1cUBSzOgR5g56joQKYtq4SU89GwnVwhTSTi3Pflbp0iSUxjO82oHS37qSr12xjhPZLbhrHelbzkIKEW2is= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705489514; c=relaxed/simple; bh=PNWBfT3brWnSrGjSLIIJL7jK1tCaLLjMr8MvOaaKuXE=; h=Received:DKIM-Signature:Received:Received:Received:From:To:CC: Subject:Date:Message-ID:X-Mailer:MIME-Version: Content-Transfer-Encoding:Content-Type:X-Originating-IP: X-ClientProxiedBy:X-QCInternal:X-Proofpoint-Virus-Version: X-Proofpoint-ORIG-GUID:X-Proofpoint-GUID: X-Proofpoint-Virus-Version:X-Proofpoint-Spam-Details; b=IEgYh6q13Cst2v/WlRHfgnd2sRPRGiuvZ09sWSDo4bG6jcRWkvk5gzxHnlvYa1brABWgtzfvTfejyHpLKc1MdnhuHtlVHTfjHWWO5z60atQ5Qkl8TfCIPhQvHglUEYloZ18zZIsj5nooRphNwoBsTA6jKYE1bNstQbRbnkXlAp4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=c9mXE4n+; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 40HAs2sD006655; Wed, 17 Jan 2024 11:05:03 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding:content-type; s=qcppdkim1; bh=4sA3r5O 3wj/axNBGa2L0bed+MqSV0LZ+CkNHTof+8sk=; b=c9mXE4n+wOjqTvrxYsEiKFq sgukZ/N2QDwzmYLSjpPgv17cjuemYhIaMOSr+e6zsH2graI00zRwQ1TMVzr0MDFu nCqmf/wCAaeUbeal4fT0QXrGJ/ToLiNnVID+pORAXOeE71En/mWpFKs9aPxrtB01 ImUVmCmJNBCYyjG4PLdtXo/H19F7+pofq0YcWi/61cFI2FYepXPtTZK42GFNcf5i AzOGJ6Ixqwu9qFbl0buLhCQm6/XENGQp48RvtVTCPSBGuTYa+vOarG1qt8JEeKfr Xke2+6IMmCPqiwSGx3fvyQzUYOyWrJPPTiLnVWPw8WK5wNpeIccIEb9fmrJXKlQ= = Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vp4ak14n0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 17 Jan 2024 11:05:03 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 40HB520J016233 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 17 Jan 2024 11:05:02 GMT Received: from hu-sibis-blr.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Wed, 17 Jan 2024 03:04:57 -0800 From: Sibi Sankar <quic_sibis@quicinc.com> To: <sudeep.holla@arm.com>, <cristian.marussi@arm.com>, <rafael@kernel.org>, <viresh.kumar@linaro.org>, <morten.rasmussen@arm.com>, <dietmar.eggemann@arm.com>, <lukasz.luba@arm.com>, <sboyd@kernel.org> CC: <linux-arm-kernel@lists.infradead.org>, <linux-pm@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <quic_mdtipton@quicinc.com>, <linux-arm-msm@vger.kernel.org>, <nm@ti.com>, Sibi Sankar <quic_sibis@quicinc.com> Subject: [PATCH 0/3] cpufreq: scmi: Add boost frequency support Date: Wed, 17 Jan 2024 16:34:40 +0530 Message-ID: <20240117110443.2060704-1-quic_sibis@quicinc.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: DX8TPyMY3BU8fmpWDuXZ-B4QYiZfjKRL X-Proofpoint-GUID: DX8TPyMY3BU8fmpWDuXZ-B4QYiZfjKRL X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-01-17_06,2024-01-17_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1011 bulkscore=0 mlxlogscore=924 mlxscore=0 impostorscore=0 phishscore=0 adultscore=0 malwarescore=0 suspectscore=0 lowpriorityscore=0 priorityscore=1501 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2311290000 definitions=main-2401170078 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788335394979053265 X-GMAIL-MSGID: 1788335394979053265 |
Series |
cpufreq: scmi: Add boost frequency support
|
|
Message
Sibi Sankar
Jan. 17, 2024, 11:04 a.m. UTC
This series adds provision to mark dynamic opps as boost capable and adds boost frequency support to the scmi cpufreq driver. Depends on: HW pressure v4: https://patchwork.kernel.org/project/linux-arm-msm/cover/20240109164655.626085-1-vincent.guittot@linaro.org/ scmi notification v2: https://patchwork.kernel.org/project/linux-arm-msm/cover/20240117104116.2055349-1-quic_sibis@quicinc.com/ Sibi Sankar (3): OPP: Extend dev_pm_opp_data with turbo support firmware: arm_scmi: Add support for marking certain frequencies as boost cpufreq: scmi: Enable boost support drivers/cpufreq/scmi-cpufreq.c | 20 +++++++++++++++++++- drivers/firmware/arm_scmi/perf.c | 11 ++++++++++- drivers/opp/core.c | 1 + include/linux/pm_opp.h | 1 + 4 files changed, 31 insertions(+), 2 deletions(-)
Comments
On 17-01-24, 16:34, Sibi Sankar wrote: > This series adds provision to mark dynamic opps as boost capable and adds > boost frequency support to the scmi cpufreq driver. > > Depends on: > HW pressure v4: https://patchwork.kernel.org/project/linux-arm-msm/cover/20240109164655.626085-1-vincent.guittot@linaro.org/ > scmi notification v2: https://patchwork.kernel.org/project/linux-arm-msm/cover/20240117104116.2055349-1-quic_sibis@quicinc.com/ > > Sibi Sankar (3): > OPP: Extend dev_pm_opp_data with turbo support > firmware: arm_scmi: Add support for marking certain frequencies as > boost > cpufreq: scmi: Enable boost support Sudeep, please lemme know if you are okay with the changes. Will apply them.
On Tue, Jan 23, 2024 at 11:38:27AM +0530, Viresh Kumar wrote: > On 17-01-24, 16:34, Sibi Sankar wrote: > > This series adds provision to mark dynamic opps as boost capable and adds > > boost frequency support to the scmi cpufreq driver. > > > > Depends on: > > HW pressure v4: https://patchwork.kernel.org/project/linux-arm-msm/cover/20240109164655.626085-1-vincent.guittot@linaro.org/ > > scmi notification v2: https://patchwork.kernel.org/project/linux-arm-msm/cover/20240117104116.2055349-1-quic_sibis@quicinc.com/ @Sudeep, I am going to start review on this series and the related one these next few days. Thanks, Cristian
On Tue, Jan 23, 2024 at 11:38:27AM +0530, Viresh Kumar wrote: > On 17-01-24, 16:34, Sibi Sankar wrote: > > This series adds provision to mark dynamic opps as boost capable and adds > > boost frequency support to the scmi cpufreq driver. > > > > Depends on: > > HW pressure v4: https://patchwork.kernel.org/project/linux-arm-msm/cover/20240109164655.626085-1-vincent.guittot@linaro.org/ > > scmi notification v2: https://patchwork.kernel.org/project/linux-arm-msm/cover/20240117104116.2055349-1-quic_sibis@quicinc.com/ > > > > Sibi Sankar (3): > > OPP: Extend dev_pm_opp_data with turbo support > > firmware: arm_scmi: Add support for marking certain frequencies as > > boost > > cpufreq: scmi: Enable boost support > > Sudeep, please lemme know if you are okay with the changes. Will apply > them. I was planning to look at it once Lukasz/Dietmar confirm that this concept doesn't change anything fundamental in the way EAS related changes work today. I know I suggested the change as that seem to be right way to do but I haven't analysed if this has any negative impact on the existing features as this change will impact all the existing platform with OPPs above sustained performance/frequency advertised from the SCMI platform firmware.
On 23/01/2024 11:15, Sudeep Holla wrote: > On Tue, Jan 23, 2024 at 11:38:27AM +0530, Viresh Kumar wrote: >> On 17-01-24, 16:34, Sibi Sankar wrote: >>> This series adds provision to mark dynamic opps as boost capable and adds >>> boost frequency support to the scmi cpufreq driver. >>> >>> Depends on: >>> HW pressure v4: https://patchwork.kernel.org/project/linux-arm-msm/cover/20240109164655.626085-1-vincent.guittot@linaro.org/ >>> scmi notification v2: https://patchwork.kernel.org/project/linux-arm-msm/cover/20240117104116.2055349-1-quic_sibis@quicinc.com/ >>> >>> Sibi Sankar (3): >>> OPP: Extend dev_pm_opp_data with turbo support >>> firmware: arm_scmi: Add support for marking certain frequencies as >>> boost >>> cpufreq: scmi: Enable boost support >> >> Sudeep, please lemme know if you are okay with the changes. Will apply >> them. > > I was planning to look at it once Lukasz/Dietmar confirm that this concept > doesn't change anything fundamental in the way EAS related changes work > today. I know I suggested the change as that seem to be right way to do > but I haven't analysed if this has any negative impact on the existing > features as this change will impact all the existing platform with OPPs > above sustained performance/frequency advertised from the SCMI platform > firmware. I was mostly concerned about the settings for the CPU frequency invariance implementation in [drivers/base/arch_topology.c]: #define arch_scale_freq_capacity topology_get_freq_scale But per_cpu(capacity_freq_ref, cpu) is still set to 'policy->cpuinfo.max_freq' in init_cpu_capacity_callback() which stays the same. With some extra debugging I get the following on Juno-r0 [L b b L L L]: root@juno:~# dmesg -w | grep -i "freq\|boost\|noti\|OPP\|cap" [ 1.768414] arm-scmi firmware:scmi: SCMI Notifications - Core Enabled. [ 1.793084] [1][LITTLE_CPU]:: Registered OPP[0] 450000000 [ 1.798624] [1][LITTLE_CPU]:: Registered OPP[1] 575000000 [ 1.804131] [1][LITTLE_CPU]:: Registered OPP[2] 700000000 [ 1.809552] scmi_dvfs_device_opps_add() sustained_freq=700000000 freq=775000000 [ 1.816971] [1][LITTLE_CPU]:: Registered OPP[3] 775000000 [ 1.822392] scmi_dvfs_device_opps_add() sustained_freq=700000000 freq=850000000 [ 1.829800] [1][LITTLE_CPU]:: Registered OPP[4] 850000000 [ 1.835268] enabled boost: 0 [ 1.838173] init_cpu_capacity_callback() cpu=0 max_freq=850000 [ 1.844032] init_cpu_capacity_callback() cpu=3 max_freq=850000 [ 1.849886] init_cpu_capacity_callback() cpu=4 max_freq=850000 [ 1.855743] init_cpu_capacity_callback() cpu=5 max_freq=850000 [ 1.866324] cpufreq_update_pressure() cpu=0 cpufreq_pressure=0 [ 1.872178] cpufreq_update_pressure() cpu=3 cpufreq_pressure=0 [ 1.878026] cpufreq_update_pressure() cpu=4 cpufreq_pressure=0 [ 1.883874] cpufreq_update_pressure() cpu=5 cpufreq_pressure=0 [ 1.890633] [0][BIG_CPU]:: Registered OPP[0] 450000000 [ 1.895892] [0][BIG_CPU]:: Registered OPP[1] 625000000 [ 1.901129] [0][BIG_CPU]:: Registered OPP[2] 800000000 [ 1.906286] scmi_dvfs_device_opps_add() sustained_freq=800000000 freq=950000000 [ 1.906381] [0][BIG_CPU]:: Registered OPP[3] 950000000 [ 1.917377] scmi_dvfs_device_opps_add() sustained_freq=800000000 freq=1100000000 [ 1.917468] [0][BIG_CPU]:: Registered OPP[4] 1100000000 [ 1.939237] enabled boost: 0 [ 1.942134] init_cpu_capacity_callback() cpu=1 max_freq=1100000 [ 1.948078] init_cpu_capacity_callback() cpu=2 max_freq=1100000 [ 1.959003] cpufreq_update_pressure() cpu=1 cpufreq_pressure=0 [ 1.964853] cpufreq_update_pressure() cpu=2 cpufreq_pressure=0 root@juno:/sys/devices/system/cpu/cpufreq# cat boost policy*/boost 1 0 0 root@juno:/sys/devices/system/cpu/cpufreq# cat policy*/scaling_available_frequencies policy*/scaling_boost_frequencies 450000 575000 700000 450000 625000 800000 775000 850000 950000 1100000 If I disable system-wide boost I see the correct influence on 'cpufreq_pressure': root@juno:/sys/devices/system/cpu/cpufreq# echo 0 > boost [ 439.466682] cpufreq_update_pressure() cpu=1 cpufreq_pressure=280 [ 439.472797] cpufreq_update_pressure() cpu=2 cpufreq_pressure=280 [ 439.478889] cpufreq_update_pressure() cpu=0 cpufreq_pressure=79 [ 439.484852] cpufreq_update_pressure() cpu=3 cpufreq_pressure=79 [ 439.490843] cpufreq_update_pressure() cpu=4 cpufreq_pressure=79 [ 439.499621] cpufreq_update_pressure() cpu=5 cpufreq_pressure=79 reflecting the max frequency change from '1100000 to 800000' on CPU1,2 and from '850000 to 700000' on CPU0,3-5. root@juno:/sys/devices/system/cpu/cpufreq# echo 1 > boost [ 2722.693113] cpufreq_update_pressure() cpu=1 cpufreq_pressure=0 [ 2722.699041] cpufreq_update_pressure() cpu=2 cpufreq_pressure=0 [ 2722.704962] cpufreq_update_pressure() cpu=0 cpufreq_pressure=0 [ 2722.710842] cpufreq_update_pressure() cpu=3 cpufreq_pressure=0 [ 2722.719644] cpufreq_update_pressure() cpu=4 cpufreq_pressure=0 [ 2722.728224] cpufreq_update_pressure() cpu=5 cpufreq_pressure=0 What doesn't work for me is to disable boost per policy: root@juno:/sys/devices/system/cpu/cpufreq# echo 1 > boost root@juno:/sys/devices/system/cpu/cpufreq# echo 0 > policy0/boost root@juno:/sys/devices/system/cpu/cpufreq# echo 0 > policy1/boost Here I don't see 'cpufreq_pressure' changes. BTW, what's the use case you have in mind for this feature? Is it to cap high OPPs for CPUs in a certain CPUfreq policy?
On Wed, Jan 31, 2024 at 04:07:48PM +0100, Dietmar Eggemann wrote: [...] > > root@juno:/sys/devices/system/cpu/cpufreq# cat boost policy*/boost > 1 > 0 > 0 OK I admit, I wasn't aware of this per policy boost flag. It must be enabled by default if it has any effect. Otherwise it breaks the existing behaviour on all the SCMI based platforms.
On 1/31/24 20:37, Dietmar Eggemann wrote: > On 23/01/2024 11:15, Sudeep Holla wrote: >> On Tue, Jan 23, 2024 at 11:38:27AM +0530, Viresh Kumar wrote: >>> On 17-01-24, 16:34, Sibi Sankar wrote: >>>> This series adds provision to mark dynamic opps as boost capable and adds >>>> boost frequency support to the scmi cpufreq driver. >>>> >>>> Depends on: >>>> HW pressure v4: https://patchwork.kernel.org/project/linux-arm-msm/cover/20240109164655.626085-1-vincent.guittot@linaro.org/ >>>> scmi notification v2: https://patchwork.kernel.org/project/linux-arm-msm/cover/20240117104116.2055349-1-quic_sibis@quicinc.com/ >>>> >>>> Sibi Sankar (3): >>>> OPP: Extend dev_pm_opp_data with turbo support >>>> firmware: arm_scmi: Add support for marking certain frequencies as >>>> boost >>>> cpufreq: scmi: Enable boost support >>> >>> Sudeep, please lemme know if you are okay with the changes. Will apply >>> them. >> >> I was planning to look at it once Lukasz/Dietmar confirm that this concept >> doesn't change anything fundamental in the way EAS related changes work >> today. I know I suggested the change as that seem to be right way to do >> but I haven't analysed if this has any negative impact on the existing >> features as this change will impact all the existing platform with OPPs >> above sustained performance/frequency advertised from the SCMI platform >> firmware. > > I was mostly concerned about the settings for the CPU frequency > invariance implementation in [drivers/base/arch_topology.c]: > > #define arch_scale_freq_capacity topology_get_freq_scale > > But per_cpu(capacity_freq_ref, cpu) is still set to > 'policy->cpuinfo.max_freq' in init_cpu_capacity_callback() > which stays the same. > > With some extra debugging I get the following on Juno-r0 [L b b L L L]: > > root@juno:~# dmesg -w | grep -i "freq\|boost\|noti\|OPP\|cap" > > [ 1.768414] arm-scmi firmware:scmi: SCMI Notifications - Core Enabled. > [ 1.793084] [1][LITTLE_CPU]:: Registered OPP[0] 450000000 > [ 1.798624] [1][LITTLE_CPU]:: Registered OPP[1] 575000000 > [ 1.804131] [1][LITTLE_CPU]:: Registered OPP[2] 700000000 > [ 1.809552] scmi_dvfs_device_opps_add() sustained_freq=700000000 freq=775000000 > [ 1.816971] [1][LITTLE_CPU]:: Registered OPP[3] 775000000 > [ 1.822392] scmi_dvfs_device_opps_add() sustained_freq=700000000 freq=850000000 > [ 1.829800] [1][LITTLE_CPU]:: Registered OPP[4] 850000000 > [ 1.835268] enabled boost: 0 > [ 1.838173] init_cpu_capacity_callback() cpu=0 max_freq=850000 > [ 1.844032] init_cpu_capacity_callback() cpu=3 max_freq=850000 > [ 1.849886] init_cpu_capacity_callback() cpu=4 max_freq=850000 > [ 1.855743] init_cpu_capacity_callback() cpu=5 max_freq=850000 > [ 1.866324] cpufreq_update_pressure() cpu=0 cpufreq_pressure=0 > [ 1.872178] cpufreq_update_pressure() cpu=3 cpufreq_pressure=0 > [ 1.878026] cpufreq_update_pressure() cpu=4 cpufreq_pressure=0 > [ 1.883874] cpufreq_update_pressure() cpu=5 cpufreq_pressure=0 > [ 1.890633] [0][BIG_CPU]:: Registered OPP[0] 450000000 > [ 1.895892] [0][BIG_CPU]:: Registered OPP[1] 625000000 > [ 1.901129] [0][BIG_CPU]:: Registered OPP[2] 800000000 > [ 1.906286] scmi_dvfs_device_opps_add() sustained_freq=800000000 freq=950000000 > [ 1.906381] [0][BIG_CPU]:: Registered OPP[3] 950000000 > [ 1.917377] scmi_dvfs_device_opps_add() sustained_freq=800000000 freq=1100000000 > [ 1.917468] [0][BIG_CPU]:: Registered OPP[4] 1100000000 > [ 1.939237] enabled boost: 0 > [ 1.942134] init_cpu_capacity_callback() cpu=1 max_freq=1100000 > [ 1.948078] init_cpu_capacity_callback() cpu=2 max_freq=1100000 > [ 1.959003] cpufreq_update_pressure() cpu=1 cpufreq_pressure=0 > [ 1.964853] cpufreq_update_pressure() cpu=2 cpufreq_pressure=0 > > root@juno:/sys/devices/system/cpu/cpufreq# cat boost policy*/boost > 1 > 0 > 0 > > root@juno:/sys/devices/system/cpu/cpufreq# cat policy*/scaling_available_frequencies policy*/scaling_boost_frequencies > 450000 575000 700000 > 450000 625000 800000 > 775000 850000 > 950000 1100000 > > If I disable system-wide boost I see the correct influence on > 'cpufreq_pressure': > > root@juno:/sys/devices/system/cpu/cpufreq# echo 0 > boost > > [ 439.466682] cpufreq_update_pressure() cpu=1 cpufreq_pressure=280 > [ 439.472797] cpufreq_update_pressure() cpu=2 cpufreq_pressure=280 > [ 439.478889] cpufreq_update_pressure() cpu=0 cpufreq_pressure=79 > [ 439.484852] cpufreq_update_pressure() cpu=3 cpufreq_pressure=79 > [ 439.490843] cpufreq_update_pressure() cpu=4 cpufreq_pressure=79 > [ 439.499621] cpufreq_update_pressure() cpu=5 cpufreq_pressure=79 > > reflecting the max frequency change from '1100000 to 800000' on CPU1,2 > and from '850000 to 700000' on CPU0,3-5. > > root@juno:/sys/devices/system/cpu/cpufreq# echo 1 > boost > > [ 2722.693113] cpufreq_update_pressure() cpu=1 cpufreq_pressure=0 > [ 2722.699041] cpufreq_update_pressure() cpu=2 cpufreq_pressure=0 > [ 2722.704962] cpufreq_update_pressure() cpu=0 cpufreq_pressure=0 > [ 2722.710842] cpufreq_update_pressure() cpu=3 cpufreq_pressure=0 > [ 2722.719644] cpufreq_update_pressure() cpu=4 cpufreq_pressure=0 > [ 2722.728224] cpufreq_update_pressure() cpu=5 cpufreq_pressure=0 > > What doesn't work for me is to disable boost per policy: > > root@juno:/sys/devices/system/cpu/cpufreq# echo 1 > boost > root@juno:/sys/devices/system/cpu/cpufreq# echo 0 > policy0/boost > root@juno:/sys/devices/system/cpu/cpufreq# echo 0 > policy1/boost > > Here I don't see 'cpufreq_pressure' changes. > > BTW, what's the use case you have in mind for this feature? Is it to cap > high OPPs for CPUs in a certain CPUfreq policy? Yeah, that's exactly the use case for X1E. Boost frequencies defined in the SoC are achievable by only one CPU in a cluster i.e. either the other CPUs in the same cluster should be in low power mode or offline. So it's mostly for book keeping i.e. we wouldn't to intimate incorrectly that the CPUs are running at max possible frequency when it's actually running at a lower frequency. -Sibi > >
On 13/02/2024 08:35, Sibi Sankar wrote: > > > On 1/31/24 20:37, Dietmar Eggemann wrote: >> On 23/01/2024 11:15, Sudeep Holla wrote: >>> On Tue, Jan 23, 2024 at 11:38:27AM +0530, Viresh Kumar wrote: >>>> On 17-01-24, 16:34, Sibi Sankar wrote: [...] >> root@juno:/sys/devices/system/cpu/cpufreq# cat boost policy*/boost >> 1 >> 0 >> 0 >> >> root@juno:/sys/devices/system/cpu/cpufreq# cat >> policy*/scaling_available_frequencies policy*/scaling_boost_frequencies >> 450000 575000 700000 >> 450000 625000 800000 >> 775000 850000 >> 950000 1100000 >> >> If I disable system-wide boost I see the correct influence on >> 'cpufreq_pressure': >> >> root@juno:/sys/devices/system/cpu/cpufreq# echo 0 > boost >> >> [ 439.466682] cpufreq_update_pressure() cpu=1 cpufreq_pressure=280 >> [ 439.472797] cpufreq_update_pressure() cpu=2 cpufreq_pressure=280 >> [ 439.478889] cpufreq_update_pressure() cpu=0 cpufreq_pressure=79 >> [ 439.484852] cpufreq_update_pressure() cpu=3 cpufreq_pressure=79 >> [ 439.490843] cpufreq_update_pressure() cpu=4 cpufreq_pressure=79 >> [ 439.499621] cpufreq_update_pressure() cpu=5 cpufreq_pressure=79 >> >> reflecting the max frequency change from '1100000 to 800000' on CPU1,2 >> and from '850000 to 700000' on CPU0,3-5. >> >> root@juno:/sys/devices/system/cpu/cpufreq# echo 1 > boost >> >> [ 2722.693113] cpufreq_update_pressure() cpu=1 cpufreq_pressure=0 >> [ 2722.699041] cpufreq_update_pressure() cpu=2 cpufreq_pressure=0 >> [ 2722.704962] cpufreq_update_pressure() cpu=0 cpufreq_pressure=0 >> [ 2722.710842] cpufreq_update_pressure() cpu=3 cpufreq_pressure=0 >> [ 2722.719644] cpufreq_update_pressure() cpu=4 cpufreq_pressure=0 >> [ 2722.728224] cpufreq_update_pressure() cpu=5 cpufreq_pressure=0 >> >> What doesn't work for me is to disable boost per policy: >> >> root@juno:/sys/devices/system/cpu/cpufreq# echo 1 > boost >> root@juno:/sys/devices/system/cpu/cpufreq# echo 0 > policy0/boost >> root@juno:/sys/devices/system/cpu/cpufreq# echo 0 > policy1/boost >> >> Here I don't see 'cpufreq_pressure' changes. >> >> BTW, what's the use case you have in mind for this feature? Is it to cap >> high OPPs for CPUs in a certain CPUfreq policy? > > Yeah, that's exactly the use case for X1E. Boost frequencies defined in > the SoC are achievable by only one CPU in a cluster i.e. either the > other CPUs in the same cluster should be in low power mode or offline. > So it's mostly for book keeping i.e. we wouldn't to intimate incorrectly > that the CPUs are running at max possible frequency when it's actually > running at a lower frequency. I see. What about the issue with the settings of the global and the per-policy 'boost' file? On my Juno-r0 the initial boost values are: (1) Initial setting: root@juno:/sys/devices/system/cpu/cpufreq# cat boost policy*/boost 1 0 0 Should they not all be 1 ? (2) Disabling system-wide boost root@juno:/sys/devices/system/cpu/cpufreq# echo 0 > boost Here I see 'cpufreq_pressure > 0' for all CPUs. (3) Enabling system-wide boost root@juno:/sys/devices/system/cpu/cpufreq# echo 1 > boost And here 'cpufreq_pressure == 0' for all CPUs. (4) Disabling boost for policy0. root@juno:/sys/devices/system/cpu/cpufreq# echo 0 > policy0/boost root@juno:/sys/devices/system/cpu/cpufreq# cat boost policy*/boost 1 0 1 Here nothing happened. But I was expecting to see 'cpufreq_pressure > 0' for CPUs of policy0: root@juno:/sys/devices/system/cpu/cpufreq# cat policy0/affected_cpus 0 3 4 5
On 2/15/24 20:27, Dietmar Eggemann wrote: > On 13/02/2024 08:35, Sibi Sankar wrote: >> >> >> On 1/31/24 20:37, Dietmar Eggemann wrote: >>> On 23/01/2024 11:15, Sudeep Holla wrote: >>>> On Tue, Jan 23, 2024 at 11:38:27AM +0530, Viresh Kumar wrote: >>>>> On 17-01-24, 16:34, Sibi Sankar wrote: > > [...] > [...] >>> BTW, what's the use case you have in mind for this feature? Is it to cap >>> high OPPs for CPUs in a certain CPUfreq policy? >> >> Yeah, that's exactly the use case for X1E. Boost frequencies defined in >> the SoC are achievable by only one CPU in a cluster i.e. either the >> other CPUs in the same cluster should be in low power mode or offline. >> So it's mostly for book keeping i.e. we wouldn't to intimate incorrectly >> that the CPUs are running at max possible frequency when it's actually >> running at a lower frequency. > > I see. > > What about the issue with the settings of the global and the per-policy > 'boost' file? > > On my Juno-r0 the initial boost values are: > > (1) Initial setting: > > root@juno:/sys/devices/system/cpu/cpufreq# cat boost policy*/boost > 1 > 0 > 0 > > Should they not all be 1 ? > > > (2) Disabling system-wide boost > > root@juno:/sys/devices/system/cpu/cpufreq# echo 0 > boost > > Here I see 'cpufreq_pressure > 0' for all CPUs. > > > (3) Enabling system-wide boost > > root@juno:/sys/devices/system/cpu/cpufreq# echo 1 > boost > > And here 'cpufreq_pressure == 0' for all CPUs. > > > (4) Disabling boost for policy0. > > root@juno:/sys/devices/system/cpu/cpufreq# echo 0 > policy0/boost > > root@juno:/sys/devices/system/cpu/cpufreq# cat boost policy*/boost > 1 > 0 > 1 > > Here nothing happened. But I was expecting to see 'cpufreq_pressure > 0' > for CPUs of policy0: > https://patchwork.kernel.org/project/linux-arm-msm/cover/20240227165309.620422-1-quic_sibis@quicinc.com/ Finally got some time to fix this, I've posted out the fix and re-spun the series as well. This should fix the default values of per-policy boost flags as well. -Sibi > root@juno:/sys/devices/system/cpu/cpufreq# cat policy0/affected_cpus > 0 3 4 5