Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp680392pxb; Mon, 8 Nov 2021 21:14:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJzt550BHgvIt+T8qDLErz7swozLre9WxZ5zqzk0hSagdLC9V4EhnbxnIXUuewdHtLuakg72 X-Received: by 2002:a05:6602:26cc:: with SMTP id g12mr3139883ioo.107.1636434876991; Mon, 08 Nov 2021 21:14:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636434876; cv=none; d=google.com; s=arc-20160816; b=ZhLzvWe9tXXRtH7sXKhd5tFxmu0kc1z6ArseDBywQUzjjoA1qtSfXW96XWoxafy2eT GPj5vtyH5OmM+K3t5GRuLJ2hNcqwzQ/mi3upgwsGYiIIVPLYxyeHmO1MjahH3UXKkUOP cl78mEk7xvcgcZ4bGEwjk0oGBJwgYARo0oEoxC76u9dcgsdEBxbDnCINW+L9zpm7wKAZ tUXlG/uTBf4+DnY9QLBFpaqJNuc81hv0H9aTwmioJvi68Z0Mf1I8wKAzrIzcutY79oqW MWtD8aShyum8L6eG0Iwo8pmIj8vAZ1IuuzJXluSaLUnUIW0WFoCHZXZj2h+uEleQaMDl 7R7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=s5tMJEcudqXsuhh1EA1Zp+nQ88xePj20Hc2KkNUWDsU=; b=xE2B2VBvGULai6pIaOe0ZFUfwwG61amPXUZ8gtaX0t/aYk8J4pVfbE2Td/w4t1nejr 8nB4SqPzl8S4K8u/g3ppq8WuTEdbovhZWG64qfJjrOl95xvLAlpEPccjVwOncqaC2jZW 47nIc5BlonodbPXFSgPl+KW4a7/HJOg4MyCJKUUoTLciQP6x9pZpIspI/pgKnacKbjOv FUD/OZUCPL1aE5el2QDkOPemqtbyJQ7F5bMxcmU1qyY4NPsNcKPPHiUMFSN5dE22CMXX msM4ngh4LUbM0lllBoLuVor+h23Lysg62dubIfLIFbHgy3GIHunS41sGf6aUnnVajl2a iR9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ae8kkXgD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d15si33509379ilv.102.2021.11.08.21.14.22; Mon, 08 Nov 2021 21:14:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ae8kkXgD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240407AbhKHVef (ORCPT + 99 others); Mon, 8 Nov 2021 16:34:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240367AbhKHVeb (ORCPT ); Mon, 8 Nov 2021 16:34:31 -0500 Received: from mail-qk1-x72a.google.com (mail-qk1-x72a.google.com [IPv6:2607:f8b0:4864:20::72a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 39C5CC061714 for ; Mon, 8 Nov 2021 13:31:46 -0800 (PST) Received: by mail-qk1-x72a.google.com with SMTP id n15so16850428qkp.12 for ; Mon, 08 Nov 2021 13:31:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=s5tMJEcudqXsuhh1EA1Zp+nQ88xePj20Hc2KkNUWDsU=; b=Ae8kkXgDrDFP/odEz71AJTjhaFNsH4u+OGlS3nZDJX5cldhY6nkQcUO3QoqEnqCzFa BQht6SE35qyia0jMOtiC2IebnWiVKLTwQ5UQI9+/YyOERDE5mEaV/BGgEJt4haOdcGt4 QTxe+hsOLit51eifZGmv/JTxbGLaMOVFw3YcaZ4j36SZirauQ/NMEidMBHYWXxJMq87H GIsHQ3fylNSRLGhvcHnIg7MU3g8AP6TFXK7ijyiBcFvAMeibXy9j1UNKFUWe5WBj+Duc oifkKHgZeOaumPR1+i6Z///GQfUn/sybjkp04JEGf93BdNljICpBsVV1SGIrCv92sZOC J/xA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=s5tMJEcudqXsuhh1EA1Zp+nQ88xePj20Hc2KkNUWDsU=; b=rHJALEbgYPe0w30FCG23N116SZLIhVc2kOjMSUyrwCSvGmmHcVkbV0Wc+RV0it1I+G 7W4McTAU+vj9L32U2lNe1VnvG969ymga0hYxlyHA1gO5NE8jwI9HXjboEHNWbImrLeZV 78TbnSGsBfsDOBvBFAwMrZVOK22kVNT5AdbofSYxmgczxfbYUCR8Kks26FeT4XW+oPJ6 ODBtT8unGLQcAzWdQSs9HQ4Wmk37z7DLwRB3D3h2GldQQPoL1ZdESYGBYKzKa9TmtGr4 eIy+p3WbzW+6xgVoCHfjxD2FGqlGKBaxI5Su7jvPAHxyTnPHnAdoSRFBBycScwNFMhnC ihoQ== X-Gm-Message-State: AOAM5329BKC/mOeCzbXPZVH+xeUR30vNFXJfKWkMG/88rCykUsD5cFmM +/ARCU7Xit67bLeGU9j0UnGT/Q== X-Received: by 2002:a05:620a:2a14:: with SMTP id o20mr1830012qkp.221.1636407105343; Mon, 08 Nov 2021 13:31:45 -0800 (PST) Received: from [192.168.1.93] (pool-71-163-245-5.washdc.fios.verizon.net. [71.163.245.5]) by smtp.gmail.com with ESMTPSA id w19sm2033209qkw.49.2021.11.08.13.31.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 08 Nov 2021 13:31:44 -0800 (PST) Subject: Re: [PATCH v3 0/5] Refactor thermal pressure update to avoid code duplication To: Steev Klimaszewski , Lukasz Luba Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, sudeep.holla@arm.com, will@kernel.org, catalin.marinas@arm.com, linux@armlinux.org.uk, gregkh@linuxfoundation.org, rafael@kernel.org, viresh.kumar@linaro.org, amitk@kernel.org, daniel.lezcano@linaro.org, amit.kachhap@gmail.com, bjorn.andersson@linaro.org, agross@kernel.org References: <20211103161020.26714-1-lukasz.luba@arm.com> <3cba148a-7077-7b6b-f131-dc65045aa348@arm.com> <9d533b6e-a81c-e823-fa6f-61fdea92fa65@kali.org> <74ea027b-b213-42b8-0f7d-275f3b84712e@linaro.org> <74603569-2ff1-999e-9618-79261fdb0ee4@kali.org> <59054c90-c1cd-85bf-406e-579df668d7b4@linaro.org> From: Thara Gopinath Message-ID: <2c54dbbd-2ecb-fb76-fa9f-9752f429c20e@linaro.org> Date: Mon, 8 Nov 2021 16:31:44 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/8/21 10:22 AM, Steev Klimaszewski wrote: > >> Hi Steev, >> >> So this depends on the cpufreq governor you are using. By-default arm >> systems have sched-util governor enabled. This means you will scale up >> to boost depending on cpu load and not always. If you want to ensure >> you are always hitting boost frequency, you should enable performance >> governor for cpufreq and try. >> >> Also since the defconfig has by default CPU_FREQ_STAT enabled, you >> should be able to get statistics out of cpufreq to see the time spent >> by a cpu in each frequency. I think cpufreq-info -s should give you >> this info. If not, you can explicitly get it for each cpu from >> >> cat /sys/devices/system/cpu/cpu/cpufreq/stats/time_in_state >> >> Regarding temperature, if you have applied all the patches in the >> sdm845 LMh series and have LMh enabled, cpu throttling starts around >> 95 degree C. >> > Hi Thara, > > Indeed, I ended up finding the time_in_state when I was doing more > digging after my last mail.  I do have the sdm845 LMh series and LMh > enabled, however I don't think I've ever seen my system go above 90C here. > > So a quick look, and... we are simply almost never getting the 2.95GHz > at all, regardless of workload.  I saw Lukasz response as well about the > math possibly being wrong, but I haven't had a chance. > > Regarding the time in state - I went with policy4 instead of per cpu > (for brevity sake) and it's here: > > c630:~$ cat /sys/devices/system/cpu/cpufreq/policy4/stats/time_in_state > 825600 225037 > 902400 92 > 979200 205 > 1056000 96 > 1209600 902 > 1286400 386 > 1363200 396 > 1459200 217 > 1536000 101 > 1612800 75 > 1689600 95 > 1766400 130 > 1843200 255 > 1920000 318 > 1996800 92 > 2092800 87 > 2169600 66 > 2246400 60 > 2323200 58 > 2400000 54 > 2476800 47 > 2553600 50 > 2649600 69 > 2745600 58 > 2841600 54619 > 2956800 5 > > So we spend *very* little time in 2.96GHz and this is after almost 14 > hours of uptime on the C630.  By comparison, on a Pinebook Pro where > I've added in 2GHz as a boost frequency : Hi Steev, IIUC, PineBook Pro has Rockchip RK3399 which has 2 Cortex A-72 and 4 Cortex A-52 where as C630 has Qualcomm sdm845 which has 4 Cortex A-75 and 4 Cortex A-55. Task placements and subsequently cpu load will be different for both the platforms. With the same workload, I will expect Rockchip to system to be more loaded than sdm845. Having said that, what cpu-freq governor are you using on both the systems. > > pinebook-pro:~$ cat > /sys/devices/system/cpu/cpufreq/policy4/stats/time_in_state > 408000 16084466 > 600000 27212 > 816000 32487 > 1008000 11331 > 1200000 13268 > 1416000 75078 > 1608000 18392 > 1800000 207266 > 2016000 648612 > > With the Pinebook Pro, which doesn't even come close to getting to 95C, > we spend a lot more time in 2GHz. > > -- steev > -- Warm Regards Thara (She/Her/Hers)