From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.170 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796078353; b=4qVzr43fWRYjpzyqOZ6w8Slgv4MBPtoSyz5kCsV2PfhJ0p4uZPQPEUPTFJl7X9sA7Lhn 7ysOjB8yIc7bT7czuGXjqilUeJaHWOsvu8oNMXEX0Hf8wwGslamT4n1LERiFWLcVqh/nq 5ugBjTAaW7r7A5YY2D4hAjj8F3TpyGJUI/6L0kevhADpElFjpIc23DOZnOK86M5kRTsYy MYOmhAs9K7v75lgA86b7cwFCkIBw0CX1jswvyQRaCgf9aSZW5UI8Za7wCGcPp75FuUnxX U1W68JSjh0zecjXxFUsXlWz05q8ebMXuOV2Gawn+eY45L0KuseOtvHF36xCrsaN9HHQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796078353; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; bh=F9LeKxnFc2bPwEsya6uMwPOGIQEojImFctO/NMGRbXc=; b=SHCPfCgry2ybTcp5MuQX85QkQCsUHPhfEhtR6r7nvIcDgfLDeEIFuCk37yVdWicL/qZI N632MQ8+K7W9d4shGQehm588TYJtr2itsoOS54nDDswBxaRyrTVXj7AVyZjPgszAoeIJ9 GbDNbFsd/4QzOGqim5v1S/4j77QdxON1nmCBsDCFHUYL7CL6iMFGRyPoclZA6Rq5+OAFq Tn/6XmiCMdjTmyyycT0DeehqVBvgoTHg/BFKKlL+c8U6k4zMxEgBC0ngIFUGutvPXDlim paxtwijYp+yJxTRQuuVFA02/QWNSD+d7XqtHbl4oEgpSlrthhE90Pr2buW+dDLqBZBA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=SeaQRWjW; arc=none smtp.remote-ip=74.125.82.170 Received: from mail-dy1-f170.google.com (mail-dy1-f170.google.com [74.125.82.170]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EF6A2606A320 for ; Mon, 30 Nov 2026 22:39:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org EF6A2606A320 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=SeaQRWjW Received: by mail-dy1-f170.google.com with SMTP id 5a478bee46e88-3869f03af6aso10363534eec.1 for ; Mon, 30 Nov 2026 14:39:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1796078352; x=1796683152; darn=lists.linux.dev; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=F9LeKxnFc2bPwEsya6uMwPOGIQEojImFctO/NMGRbXc=; b=SeaQRWjWG9PfWJ4N95j4tm0+MzYLovpPu6UHMZ6DK/5iKlSEi3ZwQU8S0JKARd7o0h NChoya8lU0Ff31AUkVNBzfldpMaH3I/yxX6OiwwlVwx5yNzY4R4UMQQqXeCmGNL3iGK8 /RNwefc4hwBun7qlFrWwTxqMqm1bwWNojejU4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796078352; x=1796683152; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=F9LeKxnFc2bPwEsya6uMwPOGIQEojImFctO/NMGRbXc=; b=BsWJTSQvXXtcJZ1iNkZfYK9ymFiOTSlX4b+7QcMgoVoMPY3HoHms11yKTQn3BHEios oEtg+Kexd3rN5aG3eWNIhYZ5mzQvcrRAfGG3OZAv8Wws3NL2hn3NpbtPACjDRUb0+Yjf 4F6SuKKGWpdLE3YuqPLwHSU3yz83vsq/Rl6arjGbiZirI/nbX8dHGduAZQmrTw65+ZLt 7zxZF3mIUqqsHT/mYeM+Ns+eZ/aveKI+NbxTxgAJe9WA5rhUAW/4h6Cy8IgnZTuG6Vjp tASO4nM8+XGK2bDG1IePB8UF0pzi0n+xIUNco1ZCcRPuJlkExbCIwQTBZARr9rc6jaYQ aB4w== X-Forwarded-Encrypted: i=1; AL+hErFrmx3YgO1l9iP6Q3v75UE6C4lir2/nPu3KvV7JkNJxyGUsiji+S6ocf6q82lgIiBOUbxF83+cz7mJWnw==@lists.linux.dev X-Gm-Message-State: APuU4Z9WeNfy+jDz8H/1RWeNhsstq47JHzCR4NevRlUt7UMROZWb53EJ QdA/vF/PF8eEshsFSnnoRuY8ZpbgGz1DZqyPf+NT93SWrqWAaaB6qaSH5oXm1JfpEA== X-Gm-Gg: AZFdTZf4WJVwYkfUjUYWpJeP+E4tKz6WQwrPwlwYcbWmi4TNTx9dB35Xh3iNiwSx8nk YOANFw05JCmaMJVI002oJwhe/byH5CVc1xdj3wDwcvExkYxEX2cSgbpywfSjTXlXlDmGvew/yV5 YlESuOqUVMAVvoJeUyZRNihr6ytx2809pBP6i8T4aR/ClU/zHb6FF81q1u9piwknMwQFAUjtrlj 8hwkA6XNWfg6weKU21CszMeVcslIBqjdQoL3DORXyZIgqAcj8Ao4FmU609/t9C3ZUmc66rl6n3J 2Pz77qilHmKp11PJwePIucnSO6PRh5Rsjy+HxWqIHeHOUZPdIkG/tCFu3WvP2B8yVzHKRFmS9/C mplJfNOQ+jto0+NVVGAZC0ZTd5pnTRHTqXNCAxd/lXxmigEwtmCt2WIxSGgOdQj8Mzm4FqyRlbf 5bBWVu1rpcNtufWH7JTUFsphIaGS3q+cEAZj8Xn8uPW+Sse5hunu/1tqfNowmdN+uVJhnL4yPYm Q0sBl/8EiaF9DvObhG6J/LkFYwHicqKHu2gNd7ykuAgejz6NwZODX4gA1uR9qNR+S06hvGD73Gk gT3tHiI/r2+Cuc6HG+7a7c9pJMxkfxFQia/rmE4fbUzFZ3RoPRTxAyid5V3pubIRdlvH X-Received: by 2002:a05:693c:414b:20b0:386:a10b:f709 with SMTP id 5a478bee46e88-386a10bf99bmr31871055eec.21.1796078351685; Mon, 30 Nov 2026 14:39:11 -0800 (PST) Received: from localhost ([2a00:79e0:2e7c:8:d64c:d468:46b8:64da]) by smtp.gmail.com with UTF8SMTPSA id 5a478bee46e88-385672c6f31sm100957931eec.15.2026.11.30.14.39.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 30 Nov 2026 14:39:11 -0800 (PST) Date: Mon, 30 Nov 2026 14:39:09 -0800 From: Brian Norris To: "Rafael J. Wysocki" Cc: Linux PM , Alan Stern , Sakari Ailus , Ulf Hansson , Linux Driver Core Development Subject: Re: [PATCH v2 4/4] PM: runtime: Update stale pm_runtime_put_sync() kerneldoc comment Message-ID: References: <4779892.LvFx2qVVIh@rafael.j.wysocki> <23323169.EfDdHjke4D@rafael.j.wysocki> X-Mailing-List: driver-core@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <23323169.EfDdHjke4D@rafael.j.wysocki> On Tue, Nov 24, 2026 at 04:39:01PM +0100, Rafael J. Wysocki wrote: > From: "Rafael J. Wysocki" > > The pm_runtime_put_sync() kerneldoc comment still claims that it does not > update the last access time which is not correct any more. Also the > suggestion to use pm_runtime_put_sync_autosuspend() or instead of > pm_runtime_put_sync() for devices with autosuspend enabled is outdated. > > Make that kerneldoc comment more up to date. > > Fixes: 26236a3e8803 ("PM: runtime: Update last_busy before calling rpm_suspend() in rpm_idle()") > Reported-by: Brian Norris > Signed-off-by: Rafael J. Wysocki > --- We're halfway between recommending using the autosuspend() variants, and not. e.g., pm_runtime_put_sync_autosuspend() still says, "Prefer this API over pm_runtime_put_sync() for devices that use autosuspend", while you're (rightfully) changing pm_runtime_put_sync()'s recommendations to be a bit weaker. And there's even more in Documentation/power/runtime_pm.rst that suggests using the autosuspend() variation. But that's a larger thing to rework in the docs. We could either wait until we remove .runtime_idle() (so there are zero differences), or we could start changing recommendations to the rpm_idle()-based helpers (since they are a superset of rpm_suspend()-based / *_autosuspend() helpers) right now. This is more a request for input, rather than a request for you to change things. Perhaps I can take another pass at the docs, pending your input. In any case, this is a fine start IMO: Reviewed-by: Brian Norris > New patch in v2. > > --- > include/linux/pm_runtime.h | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/include/linux/pm_runtime.h b/include/linux/pm_runtime.h > index 7972bfb90d6c..3f593a783e17 100644 > --- a/include/linux/pm_runtime.h > +++ b/include/linux/pm_runtime.h > @@ -692,9 +692,9 @@ DEFINE_GUARD_COND(pm_runtime_active_auto, _try_enabled, > * Decrement the runtime PM usage counter of @dev. If the counter drops to zero, > * synchronously evaluate and trigger idle/suspend handling. > * > - * Note that this does not update the last access time, but it does respect > - * existing autosuspend timers. If @dev uses autosuspend, consider using > - * pm_runtime_put_sync_autosuspend() or pm_runtime_put_sync_suspend() instead. > + * This updates the last access time and respects existing autosuspend timers. > + * If @dev uses autosuspend and respecting its autosuspend delay is not > + * desirable, consider using pm_runtime_put_sync_suspend() instead. > * > * The runtime PM usage counter of @dev remains decremented in all cases, even > * if it returns an error code. > -- > 2.51.0 > > > >