From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 51BD4C433EF for ; Tue, 23 Nov 2021 09:11:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235206AbhKWJOc (ORCPT ); Tue, 23 Nov 2021 04:14:32 -0500 Received: from foss.arm.com ([217.140.110.172]:49846 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234292AbhKWJO3 (ORCPT ); Tue, 23 Nov 2021 04:14:29 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A1D69ED1; Tue, 23 Nov 2021 01:11:21 -0800 (PST) Received: from [10.57.23.185] (unknown [10.57.23.185]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id AFB233F73B; Tue, 23 Nov 2021 01:11:17 -0800 (PST) Subject: Re: [PATCH v4 0/5] Refactor thermal pressure update to avoid code duplication To: Viresh Kumar Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, steev@kali.org, sudeep.holla@arm.com, will@kernel.org, catalin.marinas@arm.com, linux@armlinux.org.uk, gregkh@linuxfoundation.org, rafael@kernel.org, amitk@kernel.org, daniel.lezcano@linaro.org, amit.kachhap@gmail.com, thara.gopinath@linaro.org, bjorn.andersson@linaro.org, agross@kernel.org References: <20211109195714.7750-1-lukasz.luba@arm.com> <20211111031535.nvrngqqffdmw2jgz@vireshk-i7> From: Lukasz Luba Message-ID: Date: Tue, 23 Nov 2021 09:11:15 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20211111031535.nvrngqqffdmw2jgz@vireshk-i7> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Hi Viresh, On 11/11/21 3:15 AM, Viresh Kumar wrote: > On 09-11-21, 19:57, Lukasz Luba wrote: >> Hi all, >> >> This patch set v4 aims to refactor the thermal pressure update >> code. There are already two clients which do similar thing: >> convert the capped frequency value into the capacity of >> affected CPU and call the 'set' function to store the >> reduced capacity into the per-cpu variable. >> There might be more than two of these users. In near future >> it will be scmi-cpufreq driver, which receives notification >> from FW about reduced frequency due to thermal. Other vendors >> might follow. Let's avoid code duplication and potential >> conversion bugs. Move the conversion code into the arch_topology.c >> where the capacity calculation setup code and thermal pressure sit. >> >> Apart from that $subject patches, there is one patch (3/5) which fixes >> issue in qcom-cpufreq-hw.c when the thermal pressure is not >> updated for offline CPUs. It's similar fix that has been merged >> recently for cpufreq_cooling.c: >> 2ad8ccc17d1e4270cf65a3f2 >> >> The patch 4/5 fixes also qcom-cpufreq-hw.c driver code which did >> the translation from frequency to capacity wrongly when there >> was a boost frequency available and stored in 'policy->cpuinfo.max_freq'. > > LGTM. I will apply this in a few days so people get time to Ack/Review > the patches. > Thara has reviewed the patches. Could you take the patch set into your tree, please? From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 67820C433FE for ; Tue, 23 Nov 2021 09:15:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:Cc:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=lKKJUHdyHeOpUkn9gkgRhwGwgxFK1Er+iUOo2jScs90=; b=Xq031U1VV1lU2OF3yQRNvoERDa OGFhYaD7cj3OelZN9iiHxazDJhKXNveWdCP3O54Ub4/JTJFPE3gKwpdXhBDfJBel1/2Gu7QWxDdEP qAscxcmZyV0CHHrOdGm6d8+UAtT54qfzx9+hCFmwPjQema5BjEDiqbjf3Iv2sslsN2L+bKi1uy1wK A2s6tAUL/Y9WqT75QoIieFpEzwst6DmtfCJfqa+YbLtSfk3Z8R65CNh2U9xeHL4Rhqrj+50hGNvfA AaMNGIdQaRyvV00FUpPc3K/b2+TtkwI0Q+qf+nxVCmelfT8XoySKcIxXVyKf07WWbupQ3BYaSNH11 StEIhKuw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mpRpp-001ROX-H8; Tue, 23 Nov 2021 09:11:30 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mpRpi-001RNW-HJ for linux-arm-kernel@lists.infradead.org; Tue, 23 Nov 2021 09:11:24 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A1D69ED1; Tue, 23 Nov 2021 01:11:21 -0800 (PST) Received: from [10.57.23.185] (unknown [10.57.23.185]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id AFB233F73B; Tue, 23 Nov 2021 01:11:17 -0800 (PST) Subject: Re: [PATCH v4 0/5] Refactor thermal pressure update to avoid code duplication To: Viresh Kumar Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, steev@kali.org, sudeep.holla@arm.com, will@kernel.org, catalin.marinas@arm.com, linux@armlinux.org.uk, gregkh@linuxfoundation.org, rafael@kernel.org, amitk@kernel.org, daniel.lezcano@linaro.org, amit.kachhap@gmail.com, thara.gopinath@linaro.org, bjorn.andersson@linaro.org, agross@kernel.org References: <20211109195714.7750-1-lukasz.luba@arm.com> <20211111031535.nvrngqqffdmw2jgz@vireshk-i7> From: Lukasz Luba Message-ID: Date: Tue, 23 Nov 2021 09:11:15 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20211111031535.nvrngqqffdmw2jgz@vireshk-i7> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211123_011122_663380_32293034 X-CRM114-Status: GOOD ( 17.19 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Viresh, On 11/11/21 3:15 AM, Viresh Kumar wrote: > On 09-11-21, 19:57, Lukasz Luba wrote: >> Hi all, >> >> This patch set v4 aims to refactor the thermal pressure update >> code. There are already two clients which do similar thing: >> convert the capped frequency value into the capacity of >> affected CPU and call the 'set' function to store the >> reduced capacity into the per-cpu variable. >> There might be more than two of these users. In near future >> it will be scmi-cpufreq driver, which receives notification >> from FW about reduced frequency due to thermal. Other vendors >> might follow. Let's avoid code duplication and potential >> conversion bugs. Move the conversion code into the arch_topology.c >> where the capacity calculation setup code and thermal pressure sit. >> >> Apart from that $subject patches, there is one patch (3/5) which fixes >> issue in qcom-cpufreq-hw.c when the thermal pressure is not >> updated for offline CPUs. It's similar fix that has been merged >> recently for cpufreq_cooling.c: >> 2ad8ccc17d1e4270cf65a3f2 >> >> The patch 4/5 fixes also qcom-cpufreq-hw.c driver code which did >> the translation from frequency to capacity wrongly when there >> was a boost frequency available and stored in 'policy->cpuinfo.max_freq'. > > LGTM. I will apply this in a few days so people get time to Ack/Review > the patches. > Thara has reviewed the patches. Could you take the patch set into your tree, please? _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel