From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.82.172 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796078353; b=EOWX+kS0WA4VCdhtCGLap94V2aFyN7pAnmdvd38MLFSPNVdQDtPUv+9ny1KIDKbXFnYY ONmPiCvNH6nAyIY2DgJm4PjHPgbhHTpTrybVawJnoxfyaNPacYyLaTV9jEhqOmP7RUdQ8 ubwa2m70rCUF6SRtYfuGgAKzfZpR4eLc3OII+omRRgk8naSVC9jFQMl+nnKsxJcP7YxNc TAwp4ErVmLd0oIPEh18vCBKTgZtturvMw+u41Fa/GRVP6xAF/893o/WsUpfFMPKwXXPZ9 KV967hGImId+rqmBy7o11nT2vbf/a7Xzrc03GhIDkVuM5ykN/jRwtTLbGnkiRD/ka1A== 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-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=hGrEROaDKBPaIoaplVjm3y3XVcDu/+i4U+QY20/WoQwKypXkdC5aL2Cy042g9RtZIzf5 LdvzphY8Sf5BSISR6tyEaX43RoHWs9LiMRIpm+aWv8/WWNh1AZ93A7LQvTC22rZIMobI2 qdiDbsQpVKuw+5P7m9lQMplIHohrp9DMx4K8GhAg7dfHuJmi7Bg+hwLNLSsWFE02XDt/x Yiovmw/EXkTgcqmF7BPiPqlP630RN0ypttRZiy8NTJNke8il0Q5QaVgkB2Rj1TtIZpv+P YcUKcBIhouhHJWtk9mRXAbl0BZ5XezEwZyvxOijMxxjmhOj5H91mjXH/DYfp6T2SLUA== 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=NlgRRt35; arc=none smtp.remote-ip=74.125.82.172 Received: from mail-dy1-f172.google.com (mail-dy1-f172.google.com [74.125.82.172]) (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 D67DB606A31A for ; Mon, 30 Nov 2026 22:39:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org D67DB606A31A 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=NlgRRt35 Received: by mail-dy1-f172.google.com with SMTP id 5a478bee46e88-380c28f9e35so11931260eec.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=vger.kernel.org; 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=NlgRRt35qoJBWoL5oSzhvaR3mUw3DXNO1VgqWdsjz5/rPw7AQcQnDZmFRmYxIxP9BR bgYIR0uvUcPJQGXkzugWvYh/2ZSCiP8/fv6/wLsLuHdtuPB9bagelGg/SDKVbEZH/9fd pcwX88vW24Amh8bqcrAzChwj2K3+ij+QO+hsM= 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=2tgqqcq65tRnJTMa8GuTTgE5kDCkuONEc5a+IeJVEANFF/5kcshlwY9GGPibfTinYK xjyEwxNoyknk91bfOdQDsUXqKN2MUnyTqLdr86no/xozwzLkq79t6MnYdmI2ep79EbcN uDNyUot3jTBBSta5uWCTI+ZNOYnMBKFYBJ6zXbe3USzBe01uLd8snYACJMl6q7Pdcccw cve2AfETMx9AHx5BpRwdzsVjRTKEhe83oukwMOBOVYIhS2VkWE4ufMgRINqv9JRgDzfy 4uoUM2Dm6heiGfBV+bOxvu+/w4nBOziA0p8/2Yh1Ayr09NhzTYb7JzbcWNSqvw/BzwXb SIzQ== X-Gm-Message-State: APuU4Z8AK0o61eT49/Zb7m445ZUjs3SpaMU4v5HPlLdqapDrGZWPSXbd zyFT/3PhDNGReYKMzlLgRo/Zt3qvoL86YHBZszxD2rdS1R2Lk903Z+WvbLT1+Rw4Nw== X-Gm-Gg: AZFdTZfF3YkBz/AF7GiFWtR1KpFWL6WfPPkGghQza1FKHQUIphHx18f/TmoMSAO7kEc ZqAqxnOSBmiTfOLqdbVpAXFPt57MZN5gZdoeIQEDVxw+wcUdCIpp9rDuHXS5Z/n3qdD+JHPAz6m JZzlnI9kQKBAemh0u2NBCcsj1uicKyOowR7PJoBLhVWqkGhGicVKIdD+/PyjTk+iEd/Te07wwV6 /WiJppcWUCylNSMwFSrrlRi3K4r8u4i5WCbNBK4VxbXilL4ohhJNnv80gt71dRZYVpV3V1ZGA+e FYsLEoGuXa1qNZ1Fxl50gKUivwiYEUBpUiZOoKqB00W0ynwNiocOFkKvC3J9iQNpM4+r6E01//P Tg3houx7wy+EA1j6iUOgt8uhIqeOZh1vMBNR9XU4JrfVyEGYgvrA9znSmE7hU7AXHFtZeI5PvHA jr3pNI1uYecRSY3JlxwOL9u7rZfpnObwEl8xeo5A9z6USdT3mvG7mN5aLJndImTqwHLWxksrOw2 LLJr7OjHOcFxHDxJa7NHZdLiocJ75bTeGIn/tLjsL8NsqKfSNtl0G4o2UIbT1AM83160MhY6eHh JRrhRMP3fDZB5SJFdHXw9EmffjJhz4nu5onK+19RUiLa+2cu3zMEjdHPdOVEevhqDZ2d 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: linux-pm@vger.kernel.org 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 > > > >