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=1796384854; b=gst1S3A/TZkW2I/9686tWsdPyr2Hl/y5aXjZCoEYdYQw3jhhXcNjqY1o56bGg640ujku k6K+5u5GcAj2isC+ttUZSOUSp5og8TJU3YVE4vj4g6w+IlwjDFWncWH+MVwIvvgbPUY7Q jlM/+eUHshcFxwvQu6McxBhqgM/X+Jsfzr9ZkvYosbS0pwXnc3hMdS9D/PHayG2k2Xpms OX9UpDGKboGMbDahjb8DQCfYI5t3CaQk88DNGwIp09duO6eksqRWOqc27o/xUQc875Rt4 AZmkvOQYMpTTJOYGkEdXK7RtTD2BTqkwxpXIgADBQ064bcGGaOkNGksvnF0BpCHNj9g== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796384854; 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=AY5Umg57625l/Me15JW7Z0FNk9wxbG2HBErZhwYR/pE=; b=qON1FVsIBUSdG5mZ3OEUawCaNN/KMhJLDowNX21QmGUnGbx0yVL314/Uzo2N56BfrTXQ s+94Bu9NX8EJlkw0PvGI/WmDQ2C8Nra91gJ9mB9YWtnqx1agbiAOYPhtfBTzKmRHMZEEY k6EcV/Y9DJeUgjrCLwZliYVx/iWxNKiAyVn44s5n+AlYt37UuYV4aBl5wo8jwPSYTv11k cA7DqN0JCHgsJgBDW00jxoxFUFTcLJGsx0yIHwut7WPaxmQzmNZuXUD6MoIpJcz6FeYtl Nxioyndt1mM/cJIJjGz+HEYTCC/NWcjUE0inLzUGlW4RsFSPSs8Rv6Cfgt9bhXnB0ig== 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=x95qN930; 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 70318606A322; Fri, 4 Dec 2026 11:47:34 +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=x95qN930 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 995F51F00931; Fri, 4 Dec 2026 11:47:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796384854; bh=AY5Umg57625l/Me15JW7Z0FNk9wxbG2HBErZhwYR/pE=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=x95qN930HwPFKiRyHoVxuvuQtQu4Dco9CVy2WAC9YSJHFHtvbgTJfdOkJ/X4s6o4F sz+SUmLEWjPpKzrsxQEAr/TzOqvzqwC2omTIXO1kfRx7AaVsPsE6z5imHrVf2cMQYD 4A2IWhHpirhDECejYLEtvjwaZH95lXs0TFab4UGY= 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.6 0320/1167] PM: runtime: Only queue an idle check for RPM-linked suppliers Date: Fri, 4 Dec 2026 18:55:47 +0900 Message-ID: <20261204100710.345763999@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100702.047403948@linuxfoundation.org> References: <20261204100702.047403948@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-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 call with an open-coded link->flags & DL_FLAG_PM_RUNTIME test. ] 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 6e03928ccf03a..cf128d062f072 100644 --- a/drivers/base/power/runtime.c +++ b/drivers/base/power/runtime.c @@ -347,7 +347,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