Received: by 2002:a05:7412:f589:b0:e2:908c:2ebd with SMTP id eh9csp290999rdb; Tue, 31 Oct 2023 07:39:33 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFC4xo2o4gRCqf1roFKUwL5X9uAgRZg9mBZom67/D8j4dHKmcIMacxgzZ4znNcaZk7+ojzn X-Received: by 2002:a17:902:6803:b0:1bf:c59:c944 with SMTP id h3-20020a170902680300b001bf0c59c944mr9784079plk.22.1698763173218; Tue, 31 Oct 2023 07:39:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698763173; cv=none; d=google.com; s=arc-20160816; b=xNLyB21P7P+goObCI4jr/Fsj4zpCW17mki9g/OETjUApgGKcMfQRFbYO1SgHh4mos4 +CbGF1i+9hSf8hIv1lrvEvXnsOaof/IJTKbC5Dp3FFtr09Y3GWMi+PQtIU72Yr9wgR68 Op+AQ8mMgQ521/k1hHg8ErqocuUeRNhawKdswrgj+0+v4T8GKzvWMa8TRY++gXqIOe13 9y2/wFOUN/qhrHGGAFp2RIX3rI6sCfmdsIFXW2jlLv9ALGFPYNDBKCaSYUfeXhg6pGk2 CcgchuXAvx1nhOu07RKQg6//YsnmxvdQlb2hm5yIT5swzV0qBzOygj9b0f8zdR4fjtHp dJyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=IB39Fc6Thc+NPIUzENpNIp5bTEAN+0pZOHWwn5im5kU=; fh=FcVDQ50krbaDgFMzHCRNYlRyedj6TflU8ONJlxjL4Ck=; b=F9WWSdledT3n+Wi9bUHzdMnAk1HE4s8PA2wt0sZTeKcypGA7Tgoi/55otyMG1gPmW8 j1sagpmYxErupcZZRBwPFSotd50bMBjXggDgP+vuyEFW9sr2nziSuuBkQuWjfwbmX3Mf 8Br43v9B6kxI/KQTJi73Tw9FJHUy0h/jDTV08noM9o89eg4+pIUZJZkhYO593TwRWmmf ucC7WSc2ZvMuiad+57Q8KZ9h86FlSAgKr3VE/Ta8/lWHYMZQca+mLApg/dklmT9xkzdy /Tp9FBtf4pdd1DXIzSPUeH/lhWUxSIjo65bR8onfTf0xvHv3xrFRBayBTGVBaStl3C5U 0wlA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=harvard.edu Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id e10-20020a17090301ca00b001c1e4f9c63esi1115620plh.491.2023.10.31.07.39.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Oct 2023 07:39:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=harvard.edu Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id B9D6E802120B; Tue, 31 Oct 2023 07:39:30 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344241AbjJaOjX (ORCPT + 99 others); Tue, 31 Oct 2023 10:39:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48824 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230405AbjJaOjW (ORCPT ); Tue, 31 Oct 2023 10:39:22 -0400 Received: from netrider.rowland.org (netrider.rowland.org [192.131.102.5]) by lindbergh.monkeyblade.net (Postfix) with SMTP id 0ED30E4 for ; Tue, 31 Oct 2023 07:39:19 -0700 (PDT) Received: (qmail 717485 invoked by uid 1000); 31 Oct 2023 10:39:19 -0400 Date: Tue, 31 Oct 2023 10:39:19 -0400 From: Alan Stern To: Guan-Yu Lin Cc: gregkh@linuxfoundation.org, rafael@kernel.org, len.brown@intel.com, pavel@ucw.cz, heikki.krogerus@linux.intel.com, mkl@pengutronix.de, hadess@hadess.net, mailhol.vincent@wanadoo.fr, ivan.orlov0322@gmail.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, pumahsu@google.com, raychi@google.com, albertccwang@google.com Subject: Re: [PATCH] rpm: pm: enable PM_RPM_EXCEPTION config flag Message-ID: References: <20231031093921.755204-1-guanyulin@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231031093921.755204-1-guanyulin@google.com> X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.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 (fry.vger.email [0.0.0.0]); Tue, 31 Oct 2023 07:39:30 -0700 (PDT) On Tue, Oct 31, 2023 at 05:38:55PM +0800, Guan-Yu Lin wrote: > Introducing PM_RPM_EXCEPTION config flag, which may alter the priority > between system power management and runtime power management. In > suspend-to-idle flow, PM core will suspend all devices to avoid device Your patch affects all forms of system suspend, not just suspend-to-idle. What do you actually mean here? > interact with the system. However, chances are devices might be used by > other systems rather than a single system. In this case, PM core shouldn't > suspend the devices. One may use PM_RPM_EXCEPTION config flag to mark > such exception, and determine the power state of a device with runtime > power management rather than system power management. This sort of arrangement -- a device shared between two different systems -- could happen with any sort of device. Why does your patch affect only USB devices? > diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig > index 4b31629c5be4..beba7a0f3947 100644 > --- a/kernel/power/Kconfig > +++ b/kernel/power/Kconfig > @@ -193,6 +193,14 @@ config PM > responsible for the actual handling of device suspend requests and > wake-up events. > > +config PM_RPM_EXCEPTION > + bool "Prioritize Runtime Power Management more than Power Management" Runtime Power Management is a form of Power Management, so what you wrote doesn't make sense. What you really meant is: Prioritize Runtime Power Management more than System Power Management. > + default n > + help > + Provides a way to prioritize Runtime Power Management more than Power > + Management. This way system can suspnd with maintaining specific s/suspnd/suspend/ s/with/while/ > + components in operation. Your patch does not allow _specific_ components to be kept in operation. _All_ in-use components that support prioritized PM (with this patch, all USB components) will remain powered during system suspend, even if the user wants only _some_ of them to be kept powered. Alan Stern > + > config PM_DEBUG > bool "Power Management Debug Support" > depends on PM > -- > 2.42.0.820.g83a721a137-goog >