Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3619589rdg; Wed, 18 Oct 2023 00:13:54 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFeD9R4mdRUghiSKbJ6k+llsTpop2E7279IS72qTRv2K2Q0Kd9EmHJsN4o8K4A47wBXc4g+ X-Received: by 2002:a17:902:d2c5:b0:1c6:d0a:cf01 with SMTP id n5-20020a170902d2c500b001c60d0acf01mr6761942plc.11.1697613233852; Wed, 18 Oct 2023 00:13:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1697613233; cv=pass; d=google.com; s=arc-20160816; b=UZ4vaK2zBB4flRTxWqi4dbAuO2DRAgzG1d/8EbXhO5tiwOmKpWViETzDq1aWFSaIcT //ZSC0AZS9mMlVZ314p7x5dI+Yt9mXIgBqoPIABgcNVxiWOw3MkbVB3UcKKtjBmn1Mjl MImUSnsjb1qIAC2SdyQV0QtiOJSrGwRlqKXK4BxY1tFoIGk2qxDzOIT35fbLyuc4wnNo Q5ydunhQqJc9X/ELuApgzw3YUgKpTaYPVvPOPRpXBdn9SnUN6/F4uISobCEf1OiCy2jn yGszwZtpDuxsFC5lkqMcO0R715qaeBYVrcn8xDpdWvyyMttNBCZZDt9cFQpBUm6Scsn6 chDQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:dkim-signature; bh=a0tv/jXdlJYYydvKci7q39RV+zMHykUxsafimd8rhKc=; fh=sTqTtI2yqCYRfD1zpGcwA+KdzNICoLHN/KIa/mjzLDY=; b=PKSoedN0zIBI3ZKxrsZSKg98vhNbA2ETQiiEJeU+j+IBGW5ts28DK4wAdqvqxqws3E bYqSfKwVjlelVl1lbGd90Qt23S6SfaS6b2JwZEw2hpvqoC4eP4HMlyebk7wmO1WZrEx0 NSgqyz1RNneoRUpSmeNBgQtYrnBXmELNytkIrudpqj2d4Lr/vfUv81atd1hgs5cmaNbs 16FeDyZN+yWvtR29lDHmtL4KTJJFqpzb9L2PKzemkt/axRWIFp4V8OxN0x1uITmsB3Fq m9C64GT7vc/pAFLRSa08Yb6SkBxOKd9ONsITUpB4bF+xjz0LN6eaRaNx54KpAglxqzca 4LVg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gerhold.net header.s=strato-dkim-0002 header.b=fhZjx0VC; dkim=neutral (no key) header.i=@gerhold.net header.s=strato-dkim-0003 header.b=9ngWWFvN; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id l1-20020a170902f68100b001c5d09c7b0dsi3846295plg.458.2023.10.18.00.13.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 00:13:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@gerhold.net header.s=strato-dkim-0002 header.b=fhZjx0VC; dkim=neutral (no key) header.i=@gerhold.net header.s=strato-dkim-0003 header.b=9ngWWFvN; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 7A5268067E23; Wed, 18 Oct 2023 00:13:51 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344533AbjJRHNd (ORCPT + 99 others); Wed, 18 Oct 2023 03:13:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57458 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229805AbjJRHNb (ORCPT ); Wed, 18 Oct 2023 03:13:31 -0400 Received: from mo4-p01-ob.smtp.rzone.de (mo4-p01-ob.smtp.rzone.de [85.215.255.50]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E7A7BA; Wed, 18 Oct 2023 00:13:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697613207; cv=none; d=strato.com; s=strato-dkim-0002; b=YVEdEd+44bqyCaMa0ZwcpYPN05TNXqtKJmkgcXf8d1s0rB5y8IJABHC/SFGIhnBrWx P2AQPou+c7blTkw4dctvljfiAHy+0UbqLbzj1r0cMSXd112hX1svx8qW+tksUt0ioq1O gl1BBIv4byXkLyhElJ74uR8HJEwVyxQCPtYvpJlLW3KlfX9rh/q7ys9lSZVlmH6GCZwh +T4xJbUC8yFbj/gkmoK/9SJL0y4lcwGZS6yp0G+OeH9hH8CXvwZ6fHmusm6WCzFV5r+F w8CBApdg2V986J36+ALVSdb99X2VpriqY3JURWxInQvB/L52n8zktPlIq55Zb04fNM2D v/Uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1697613207; s=strato-dkim-0002; d=strato.com; h=In-Reply-To:References:Message-ID:Subject:Cc:To:From:Date:Cc:Date: From:Subject:Sender; bh=a0tv/jXdlJYYydvKci7q39RV+zMHykUxsafimd8rhKc=; b=W8B1QyGTNGQuEoVTeKHZMTd51/kyyHE42FVV5kcCBzUNVTUGObZDa+TTB8X00XD3fL fx+bPqf0Yt7+NW98z6sHhh+pjcnKO7Zfbpi7GW76HNpsbszKfp9yLhAIlySPgDRspgOr pFTu6OZ+JJ5oI+yEnvSuV6/g5mUPTGxa9YQPC86D9pIlSpFg0SpJe0RUw9k2TX1uIqYJ XWfQyzc0Mv/IUEGfy55s6hXBeKJGXAEmICsarMC6J+7nI3Gq8r7BkpvVyHWbZiS4GUgT 5jn9qD7gZMmyjcmwZyn1qMjhuifz76uTOzNsanKeHIEqRoxUJyROEREOhKNEjI1kQIyR rqpg== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo01 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1697613207; s=strato-dkim-0002; d=gerhold.net; h=In-Reply-To:References:Message-ID:Subject:Cc:To:From:Date:Cc:Date: From:Subject:Sender; bh=a0tv/jXdlJYYydvKci7q39RV+zMHykUxsafimd8rhKc=; b=fhZjx0VCRuCKmrPK/CZR16ebZEfIwfEUPHVnZfUVV67VdjUiCWHft3498orR681iCq tzl9wvZRymx3gxovj7zUeeMrwgahlFzENRbFxbZjV0NRr3E3xr964ANA0gpCOZN5JUnX q+qRQG1lsKFeqAe/R5jSovW0mcO48541A9ER6pmmSdaQY+ZZ2pTQwvIjdnj6hOMEG3Dg YVF9c5e9vkK6jq5I2JwJr/5kS6hY0wFTNN91eJ5uYp37N4XIG767tPrWVT3YeJ8en42o 2asiOWR0j3SEZbVkf/G+zlgkkY/I0Ly9xyjYap3FpQ4EC3f3j7H1QeiCLbYsxrjD08uJ TTlQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1697613207; s=strato-dkim-0003; d=gerhold.net; h=In-Reply-To:References:Message-ID:Subject:Cc:To:From:Date:Cc:Date: From:Subject:Sender; bh=a0tv/jXdlJYYydvKci7q39RV+zMHykUxsafimd8rhKc=; b=9ngWWFvNgop0xqTFoBm8e19FIv/0otce8CLSzVntPzaazdOQr2s4yii0lSyi7i/ra7 Z405IM7xnKU755E9SwAQ== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQ/OcYgojyw4j34+u261EJF5OxJD4peA+p3h" Received: from gerhold.net by smtp.strato.de (RZmta 49.9.0 DYNA|AUTH) with ESMTPSA id j34a49z9I7DQ7o8 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Wed, 18 Oct 2023 09:13:26 +0200 (CEST) Date: Wed, 18 Oct 2023 09:13:18 +0200 From: Stephan Gerhold To: Ulf Hansson 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 Subject: Re: [PATCH 1/4] cpufreq: qcom-nvmem: Enable virtual power domain devices Message-ID: References: <20230912-msm8909-cpufreq-v1-1-767ce66b544b@kernkonzept.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Content-Transfer-Encoding: 7bit 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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Wed, 18 Oct 2023 00:13:51 -0700 (PDT) On Tue, Oct 17, 2023 at 11:50:21PM +0200, Ulf Hansson wrote: > [...] > > > > > > *) 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. > Sounds good :) > > > > > ***) 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? > No, I don't think so. The RPM firmware makes no difference between deep cpuidle and system suspend. As long as we properly enter deep cpuidle as part of s2idle, it will automatically release our votes for the "active-only" (_AO) variant of the RPMPDs. I'll send the adjusted v2 shortly for you to look at. :) Thanks, Stephan