Received: by 2002:a05:7412:3290:b0:fa:6e18:a558 with SMTP id ev16csp831819rdb; Fri, 26 Jan 2024 12:04:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IFmNu6MJky75kyAnefpn9OqMdR/WBbK4YVwCH2hV+s3HTFDKfY9GqrMR3I3h4L/0Lid3qL7 X-Received: by 2002:a17:90a:bb84:b0:295:1740:e5ec with SMTP id v4-20020a17090abb8400b002951740e5ecmr313586pjr.2.1706299466442; Fri, 26 Jan 2024 12:04:26 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706299466; cv=pass; d=google.com; s=arc-20160816; b=VekMG2p8xU8C+m4/U5F3A5tSJO/3kznvSxMCFaQiWMHM2edXKQwHkpE6tOLGxF/77z rBHkjGMFGffWKZM7yvdVzmLEh2lYyo+otZoKMu+nrVr/c/ORBgq4Hd9xSTscTn9v0J9w qVmA032kgYnGxAtH0LGRLZJg/HhtlHLkT+JRngWZ5XN8+0KfvP/07kwNjYYg8fIQ3Cl5 2gjNB/spKVjxSCBGx7LJ8r9rg5UP6gOe/eiLSSXimMnIBCDgcKLnqssSng34mXZKFE2L povW8yqeS8UyGr3+1AI2fO10rbaV9jD5fHMfZQzLrg+H1EdOR+2kk+M0kJgqqM/HVaJw Oe2A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:message-id:references:in-reply-to:subject :cc:to:from:date:dkim-signature:mime-version:list-unsubscribe :list-subscribe:list-id:precedence; bh=GSe9cmELggsROW8Xa3K0sEdzswCwt2lkxHp4I65nO1s=; fh=pDUImKF08UQiHYzTdmayRRHq3XhkxPufldJjZjXIOJA=; b=y34WeiYXt5XVEtcEALtkz1FXsDFk2C10reniNaKuOQpOj6f5eRYlMwn78jgpv+1KrM zVqJNLrz15FdR3VSpw55NBO/MVTZBEUJ0e1r6B3dl/niIroU3EXD7ovNcAdJsMu4b9so hURq9YyU+wqjhowXPkFUzcnvFvpKvYTfFqDC9ALN0kHQ3XZ7I3Ef/2zcoSQzsvk0780n XPZ2dEWDA65AJ16imOVf/weogkqSxrk0et4GM484JycRe5UIeekS/+Zb5q+kqWSwKNkv ri4n2uOOKA7p3IgXAqQyv4NC6w+Pykj1mvOGQ3uGZZWvglHzqBRft0JzBgnCFGxay0mA BuCA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@manjaro.org header.s=2021 header.b="i/lX5Faq"; arc=pass (i=1 spf=pass spfdomain=manjaro.org dkim=pass dkdomain=manjaro.org dmarc=pass fromdomain=manjaro.org); spf=pass (google.com: domain of linux-kernel+bounces-40602-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40602-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=manjaro.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id k8-20020a17090a39c800b002906b739813si1633009pjf.151.2024.01.26.12.04.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 12:04:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40602-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@manjaro.org header.s=2021 header.b="i/lX5Faq"; arc=pass (i=1 spf=pass spfdomain=manjaro.org dkim=pass dkdomain=manjaro.org dmarc=pass fromdomain=manjaro.org); spf=pass (google.com: domain of linux-kernel+bounces-40602-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40602-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=manjaro.org 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 197C82878BB for ; Fri, 26 Jan 2024 20:04:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B581C22EE4; Fri, 26 Jan 2024 20:04:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=manjaro.org header.i=@manjaro.org header.b="i/lX5Faq" Received: from mail.manjaro.org (mail.manjaro.org [116.203.91.91]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D3D3622616; Fri, 26 Jan 2024 20:04:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=116.203.91.91 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706299459; cv=none; b=ijig1lA91DuTJNt7Rn1YXrfigMuRP1jmzv8htRGl8vOfXQFoqc76AvE0/8eJGUU6Qa7r5V6u2wzzjvmHFzD898FqKSuNmooV/Y6Sle2grxpJRgh1XQtyALd/CFMSWLfe8mpXK94Di5oe4Wwutk0fYPnhadYnrnxEx8yr+0eFzvc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706299459; c=relaxed/simple; bh=WpeuBB6OF2cH1n6dbWfQ48jzm0zZaAYZoCRX4MyWQ8E=; h=MIME-Version:Date:From:To:Cc:Subject:In-Reply-To:References: Message-ID:Content-Type; b=gXlxDSnTFQc29ndFquweFIGKlhS0Z9eeczmfV7htn4RCVHcWqac1pmsWXQcYBSPrK/ooE+SPyH9NlRzbTARbGQHYmpgSLCp2lZyel5pFUQYhGMBC0gmueJSMYuP33d3o5cQp25/m3j+bOhV95hisVoYARPH4QIbmOQKj8ako9cE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=manjaro.org; spf=pass smtp.mailfrom=manjaro.org; dkim=pass (2048-bit key) header.d=manjaro.org header.i=@manjaro.org header.b=i/lX5Faq; arc=none smtp.client-ip=116.203.91.91 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=manjaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=manjaro.org Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=manjaro.org; s=2021; t=1706299453; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GSe9cmELggsROW8Xa3K0sEdzswCwt2lkxHp4I65nO1s=; b=i/lX5FaqbJSyzbAnEJyyaHyMOF4YfJwfmEhG3d7hPKYl5Gdati1LZW5uuDVPxyQm5GvoOB JQrwFbRDLuiKl/9c6olOazGw5ERUg/IQKZk9vb/GZhnHAnNVGGEUxNMqpi/k2vzTM3K9nx SwMQ0ipJknBOEbTbruAhcgqotsJkjWO8FjFj5biTohvmu3IBvwlSYngGrb7H6XwmpnFZqm tZlzcD4AGC/qI7jxs92HXlXo6ojYJrvUaXnDCOqfftK24KdQw3RTVAElogAJIyFiGvLhsZ e9T0SjMPoeI50YvU93d8zHFdNmArScFaon66WpNc0BIC+N2ZInwLyGLLs7tPbA== Date: Fri, 26 Jan 2024 21:04:12 +0100 From: Dragan Simic To: Daniel Lezcano Cc: Alexey Charkov , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiko Stuebner , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, Viresh Kumar Subject: Re: [PATCH 4/4] arm64: dts: rockchip: Add OPP data for CPU cores on RK3588 In-Reply-To: <9b72b688-be63-464e-a5dc-cf6051ccee12@linaro.org> References: <20240125-rk-dts-additions-v1-0-5879275db36f@gmail.com> <20240125-rk-dts-additions-v1-4-5879275db36f@gmail.com> <731aac66-f698-4a1e-b9ee-46a7f24ecae5@linaro.org> <1f0608831cfb95c80edf16cd751eee76@manjaro.org> <528a37d84cdd871e717b4ebf648bb8a7@manjaro.org> <9b72b688-be63-464e-a5dc-cf6051ccee12@linaro.org> Message-ID: <0ed47e91c2d69ade447bd79bdfe5637a@manjaro.org> X-Sender: dsimic@manjaro.org Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Authentication-Results: ORIGINATING; auth=pass smtp.auth=dsimic@manjaro.org smtp.mailfrom=dsimic@manjaro.org On 2024-01-26 13:56, Daniel Lezcano wrote: > On 26/01/2024 08:49, Dragan Simic wrote: >> On 2024-01-26 08:30, Alexey Charkov wrote: >>> On Fri, Jan 26, 2024 at 11:05 AM Dragan Simic >>> wrote: >>>> On 2024-01-26 07:44, Alexey Charkov wrote: >>>> > On Fri, Jan 26, 2024 at 10:32 AM Dragan Simic >>>> > wrote: >>>> >> On 2024-01-25 10:30, Daniel Lezcano wrote: >>>> >> > On 24/01/2024 21:30, Alexey Charkov wrote: >>>> >> >> By default the CPUs on RK3588 start up in a conservative performance >>>> >> >> mode. Add frequency and voltage mappings to the device tree to enable > > [ ... ] > >>> Throttling would also lower the voltage at some point, which cools it >>> down much faster! >> >> Of course, but the key is not to cool (and slow down) the CPU cores >> too >> much, but just enough to stay within the available thermal envelope, >> which is where the same-voltage, lower-frequency OPPs should shine. > > That implies the resulting power is sustainable which I doubt it is the > case. Hmm, why wouldn't it be sustainable? Would you elaborate a bit, please? I mean, there are so many factors that can't be known for sure in advance, so providing additional CPU throttling granularity can only be helpful. > The voltage scaling makes the cooling effect efficient not the > frequency. > > For example: > opp5 = opp(2GHz, 1V) => 2 BogoWatt > opp4 = opp(1.9GHz, 1V) => 1.9 BogoWatt > opp3 = opp(1.8GHz, 0.9V) => 1.458 BogoWatt > [ other states but we focus on these 3 ] > > opp5->opp4 => -5% compute capacity, -5% power, ratio=1 > opp4->opp3 => -5% compute capacity, -23.1% power, ratio=21,6 > > opp5->opp3 => -10% compute capacity, -27.1% power, ratio=36.9 > > In burst operation (no thermal throttling), opp4 is pointless we agree > on that. Well, if there's no thermal throtting at all, the opp3 is also not needed. In an unlikely scenario like that, the opp5 is all we need. > IMO the following will happen: in burst operation with thermal > throttling we hit the trip point and then the step wise governor > reduces opp5 -> opp4. We have slight power reduction but the > temperature does not decrease, so at the next iteration, it is > throttle at opp3. And at the end we have opp4 <-> opp3 back and forth > instead of opp5 <-> opp3. Why should the temperature not decrease when switching from the opp5 to the opp4? See, we can't assume or know in advance that reducing the power consumption by 5% wouldn't do anything; 5% is actually quite a lot. If that would do absolutely nothing, then something else would probably be wrong or not as expected. Also, for some workloads it might be better to have rather frequent transitions between the opp4 and the opp3, instead of staying at the opp3 for longer priods of time. Running 100 MHz faster can be quite significant, especially on two CPU cores. > It is probable we end up with an equivalent frequency average (or > compute capacity avg). > > opp4 <-> opp3 (longer duration in states, less transitions) > opp5 <-> opp3 (shorter duration in states, more transitions) > > Some platforms had their higher OPPs with the same voltage and they > failed to cool down the CPU in the long run. > > Anyway, there is only one way to check it out :) > > Alexey, is it possible to compare the compute duration for 'dhrystone' > with these voltage OPP and without ? (with a period of cool down > between the test in order to start at the same thermal condition) ? I agree that testing and recording as much data as possible is the best approach. However, quite frankly, we should run more different tests, not only one synthetic test.