From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796387506; b=lccwpw4Q18ojViwCj7kHlL4CJKT1NlCZExvOGulWD0qM4RA01CVSPchm/U/LUn0pB94X qTSqm3TtBjQyiqFAeA3kmVye2m6gStGmoDtNaCTvoYxuEsrClftLn8i+7G9BihA90H6BB eM7tDres6pSXzWC5LJOCxwPGnwTs5GEEv1nrZKpo8bvJA8JcJC3lOaa80UpexdWR2/Nnl ble6S2PT8bq3wEMoIS7avtj5rGlJFneQsxrR2hZGH1RJ8Zg+N0U0AS5m/6jQBFXx4MZxb GKiPfCDP9GMpXjdmlyNxtoPYO1KAnO/4B6jxIEesn4Aq55Op/4GcaIWv+7mwip64xDg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796387506; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=k/RETr5xOT9q11Mg/pw6LZu0SwQKn3acf2wK/OAaGf8=; b=BHzz7WHebX7QEb3puBhX52axWNZy6oxZN7GRHrQjRA3P04Vjc8JDOftu0gVnT4x8LakG WCHF692RIIWZVG0OyQ1/RkHycuPcp15bbXfVKEoYCKVYV9oc+pXKDsE9uCmzjQNPLs+2D GdG1sjZmovDqmK8qXgdFvq2u5z0FeIaLCIDaCMx5uRPQ4uucOvtkCNoVqAvgrurToUajY fmLQ16AcfY1AZI1rt3Pw/wB5oQ7V/GeMTgHj/DFtB5KQENw97UWMxpBri2MdKn6z8sy9z dgGtu5Rc8pF4lj3eKAg4OQmTTYS3hhumMc4NQqHQ1af+JIume6Q0VWkGIq6S5KRqsDA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=XZbbibkY; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 98511606A322; Fri, 4 Dec 2026 12:31:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=XZbbibkY Received: by smtp.kernel.org (Postfix) with ESMTPSA id B43061F0092C; Fri, 4 Dec 2026 12:31:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796387506; bh=k/RETr5xOT9q11Mg/pw6LZu0SwQKn3acf2wK/OAaGf8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=XZbbibkY8/nPKXDxGUUZ8RfWyaLaPjZ64+GCSI1uc3c8/TojWQaQgnGgzkCI4QTF4 BLxJ3oZD5mzMTTtIt5PIt2HKe8B3TdODY0QDU2aGPXaN5nmUIfcR0P6BqvKlcpnp6Q YgFAEpMv6SkIIzKGEwfcYePyrKrEqULYWpr/VExE= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Brian Norris , "Rafael J. Wysocki" , Sasha Levin Subject: [PATCH 6.1 0271/1059] PM: runtime: Only queue an idle check for RPM-linked suppliers Date: Fri, 4 Dec 2026 18:56:42 +0900 Message-ID: <20261204100651.294788408@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100643.980430235@linuxfoundation.org> References: <20261204100643.980430235@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: patches@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Brian Norris [ Upstream commit be5755f023e7e02ec90bbd1d4ca63a0abe594733 ] When a device RPM-suspends, it queues up an idle check for all of its suppliers, in case that device was the last consumer, and those suppliers are now able to suspend. Today, we do this for all suppliers, and not only for those suppliers that are marked for use by runtime PM. This isn't directly harmful, but it is a bit wasteful, and also may induce unexpected suspend attempts (e.g., if a device was purposely last touched with pm_runtime_put_noidle()). To avoid excess idle checks, only call pm_request_idle() on linked suppliers that opted into runtime PM. Noticed by inspection of trace logs. This is not expected to have a functional impact on systems that are using device links properly, and should only be considered an optimization. Fixes: 5244f5e2d801 ("PM: runtime: Defer suspending suppliers") Signed-off-by: Brian Norris Link: https://patch.msgid.link/20260901013341.1417232-1-briannorris@chromium.org Signed-off-by: Rafael J. Wysocki [ sashal: Replaced the missing device_link_test(link, DL_FLAG_PM_RUNTIME) helper with the direct link->flags & DL_FLAG_PM_RUNTIME test this tree already uses. ] Signed-off-by: Sasha Levin --- drivers/base/power/runtime.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/base/power/runtime.c b/drivers/base/power/runtime.c index b4d7fcae5e5b7..24348c597b218 100644 --- a/drivers/base/power/runtime.c +++ b/drivers/base/power/runtime.c @@ -350,7 +350,8 @@ static void rpm_suspend_suppliers(struct device *dev) list_for_each_entry_rcu(link, &dev->links.suppliers, c_node, device_links_read_lock_held()) - pm_request_idle(link->supplier); + if (link->flags & DL_FLAG_PM_RUNTIME) + pm_request_idle(link->supplier); device_links_read_unlock(idx); } -- 2.53.0