Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3430780rdg; Tue, 17 Oct 2023 14:51:56 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHbzwFYwzgPuusiuwbNeVRIOnNa3E2evvCdJt08sGtcMxk2LPqQKWikBADBFPuuJhOKv4Va X-Received: by 2002:a17:903:2342:b0:1c5:a49e:7aa with SMTP id c2-20020a170903234200b001c5a49e07aamr4420556plh.27.1697579515764; Tue, 17 Oct 2023 14:51:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697579515; cv=none; d=google.com; s=arc-20160816; b=txD98EaVgtHJ6jjEzLiGZz2MS4DinM0VSTwv5xhWl7uxVo9QBMB5jJmTi/v1BO/Q6Y 8rOAgWmg5HMg+aDrFy/NtN12W0gqfAxPGf4WggXT2NRMc3R5fMUMsmbFDjoZRX0rn1rN ZeDoF/cidG+EU+XYSZ82Y/1/YdK9hw9UD/Z6uJN97YqvKNKPCACwdhZBiXovQm4H3VNt IfDZJerGarXzV2Cw8aE73EWKDX/XbsuBITQHSnW6QwavMU0T7gs4KTUu5TfwZ6HtEcsq jNCibxnjR8CdGFMigNHPHwZ4GrcX7XE41iU1jDhOm0VYi/vhl5oPTWDt79PGyBMA34ey ITFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=BfSq4fUe022kDtkFJa2azWpgcNmqdZxJ8fBh51QJEV8=; fh=nZJSwUHoZdzAYmX6xtxEnz9HM7cA0QGUBLAyl0AHDA4=; b=KZnp8Fbl7u6uH4FEI3JrQg5HLCdFzYA7Yptefv41WqHpnYeSk1QUnq8vVZF/OI1Mqb mRY+v7f4+i9xec+DTGfR+QnEpi0KVq6DYy5pa91oV7ZJY7nVF1EgZ0kRO+e3/Tkekwp4 OqCovloVEHo9iIWVXf0Dnv1SVLm+MMgArSZcwf2pL+xaP3VQq/OL/B0j4JFU9rqJ0i55 cC55+QtQ9FPrUXv+skPecjuN/GLpIeggoQD1QG/0QMFozIh9gvIYh5nhht+BqQBvfi8N cRnjyrueOGgSetzEad6beLD0VrG+3q0ktuISMFIwqGoXpIuzGhXQiPCyVbyqGXQo5g1W t/yA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tUifuL9+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id w12-20020a170902e88c00b001c3e9b0bae1si2903972plg.443.2023.10.17.14.51.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 14:51:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tUifuL9+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 180328078C99; Tue, 17 Oct 2023 14:51:17 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234891AbjJQVvE (ORCPT + 99 others); Tue, 17 Oct 2023 17:51:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34152 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234650AbjJQVvC (ORCPT ); Tue, 17 Oct 2023 17:51:02 -0400 Received: from mail-yb1-xb35.google.com (mail-yb1-xb35.google.com [IPv6:2607:f8b0:4864:20::b35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4EB4BFC for ; Tue, 17 Oct 2023 14:50:58 -0700 (PDT) Received: by mail-yb1-xb35.google.com with SMTP id 3f1490d57ef6-d9ace5370a0so6101635276.0 for ; Tue, 17 Oct 2023 14:50:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697579457; x=1698184257; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=BfSq4fUe022kDtkFJa2azWpgcNmqdZxJ8fBh51QJEV8=; b=tUifuL9+/C4O6RqXx9beMS8lhbBgG42woTccPBBbhbPVUNIm8zDKUDe/JU42ywRYQH ALtxXdQjdzeMNzrWD0TbMDqBl83CSGjRy2yQzrBYyztrdkOh4zB2dwYsFuoStdIYevI6 bpSQ4/NnbpitUQP6O4NVmq3dwIaRGdab6sWrrQ0nb3uhkQLEKITy4c+5gZ06pDICEHvN nJW9R2/7PRgNlIUUUf2yHSeTlVqKcYZZfU8GoYdXUENWiHZAz9kLf5CgW/1ji9P9GNQa BA5rVV9uyiw6flCSONyeuSiA3mF4Md2pb/j+FdWcOMZ2mWmi9i7/18NQdfMIVT4tdDpC /kPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697579457; x=1698184257; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=BfSq4fUe022kDtkFJa2azWpgcNmqdZxJ8fBh51QJEV8=; b=DLK5GbFSJ+EGaZxfaGoxR/veQNOHQ5syIvt9oRiDYkJ+5RumKi0h5CW3MIMiVlpRIs Zr8OZ82tCzRqUQtkZ+yVsLglxxR00OfrygqaZBove70fDOjKPTwVmusu+R3x8iHqoCxZ wkfhCATHEYu1VRl54mZjfDb4ieR3EBrtMz6Adii6ZaX0sHC6rRxQYRiChkZfJSTWmDzi BADvKdWDbO/7wBfH48HjMxhNoU9VH3yE41DEmboM36m7/NdRV/UXvA2ha2GP7FdY21uO LqreaXyePUlUyuSjAqPQKMEgRfqHKk1zKJETaA0Bm2owvHbGxfj1gBoZwlXHl5cF1DP8 yDGg== X-Gm-Message-State: AOJu0Yz5s7eiiB0neY03M/AMmNShvoeZqUOvUjpa8EyxH4cp3xqpMSgX 4B7UtWTT/7d6rDHS1tBPXrKiY3texccaabBX0HeuHtjYld+chK8ABeI= X-Received: by 2002:a25:254:0:b0:d9b:6264:b79e with SMTP id 81-20020a250254000000b00d9b6264b79emr3129729ybc.53.1697579457419; Tue, 17 Oct 2023 14:50:57 -0700 (PDT) MIME-Version: 1.0 References: <20230912-msm8909-cpufreq-v1-0-767ce66b544b@kernkonzept.com> <20230912-msm8909-cpufreq-v1-1-767ce66b544b@kernkonzept.com> In-Reply-To: From: Ulf Hansson Date: Tue, 17 Oct 2023 23:50:21 +0200 Message-ID: Subject: Re: [PATCH 1/4] cpufreq: qcom-nvmem: Enable virtual power domain devices To: Stephan Gerhold Cc: Stephan Gerhold , Viresh Kumar , Andy Gross , Bjorn Andersson , Konrad Dybcio , Ilia Lin , "Rafael J. Wysocki" , Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-pm@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, stable@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Tue, 17 Oct 2023 14:51:17 -0700 (PDT) [...] > > > > *) The pm_runtime_resume_and_get() works for QCS404 as a fix. It also > > works fine when there is only one RPMPD that manages the performance > > scaling. > > > > Agreed. > > > **) In cases where we have multiple PM domains to scale performance > > for, using pm_runtime_resume_and_get() would work fine too. Possibly > > we want to use device_link_add() to set up suppliers, to avoid calling > > pm_runtime_resume_and_get() for each and every device. > > > > Hm. What would you use as "supplied" device? The CPU device I guess? The consumer would be the device that is used to probe the cpureq driver and the supplier(s) the virtual devices returned from genpd when attaching. > > I'm looking again at my old patch from 2020 where I implemented this > with device links in the OPP core. Seems like you suggested this back > then too :) > > https://lore.kernel.org/linux-pm/20200826093328.88268-1-stephan@gerhold.net/ > > However, for the special case of the CPU I think we don't gain any code > simplification from using device links. There will just be a single > resume of each virtual genpd device, as well as one put during remove(). > Exactly the same applies when using device links, we need to set up the > device links once for each virtual genpd device, and clean them up again > during remove(). > > Or can you think of another advantage of using device links? No, not at this point. So, in this particular case it may not matter that much. But when the number of PM domains starts to vary between platforms it could be a nice way to abstract some logic. I guess starting without using device-links and seeing how it evolves could be a way forward too. > > > ***) Due to the above, we don't need a new mechanism to avoid > > "caching" performance states for genpd. At least for the time being. > > > > Right. Given *) and **) I'll prepare a v2 of $subject patch with the > remove() cleanup fixed and an improved commit description. > > I'll wait for a bit in case you have more thoughts about the device > links. One more thing though that crossed my mind. In the rpmpd case, is there anything we need to care about during system suspend/resume that isn't already taken care of correctly? Kind regards Uffe