From nobody Mon Apr 6 20:03:41 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 86ED637B3EC; Wed, 18 Mar 2026 08:08:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773821320; cv=none; b=nGjkmgxjj48u4DCckKZk4F6S/kozdkkLcLSJSgAKqSNh8mxRrx0W54MINKyxge7mhgJ3vYrzp0V3im5Lw+z8VqaOB/PnI/m5POiSutiNuPV/KaUzIC/bsHRz/PWjC28qVeEVHG8t5CIAxIOOvPwu+eMCCicEbChH+Pyii/aD6l8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773821320; c=relaxed/simple; bh=e/Cwo7jSXdzy6CSjwyFLV5H0F/Lh55wHgFW2SLkMDr4=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=JGmCZgdNi3YG4nBYxHi2Hq+RKAEivyAK/WJGIjMYwdWB/eU8kDrqtPvZz2snB5XmU73iIdl0GoWrF8JdVhs9Qe++MxXggKLyT7nf62PmqvPyt/4ICV2UZVcHhPZGBRD5t1BmVBajQMyDGu7KSlBKX61atK4/ja9Rtskv3FSAWJ8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=rsU5qj8t; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=f5Xd+rB+; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="rsU5qj8t"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="f5Xd+rB+" Date: Wed, 18 Mar 2026 08:08:36 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1773821318; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KJJllZIdfOCt2UhzObpYMNZuUckLW1fvt01seU4y2w8=; b=rsU5qj8tJX1tWhDs7nxzfSKDcVyEqXhg/aq85Zj/5zWgPJljlpBBjuYWM6CqnpUvGe/iA4 QbDRWgpP2RhQWKM+zgd5nc3mRMlae7kmhn01L8B4MMAiAvwvczDiyQ80t34CCSo18022ms 0NbpFhl2VBdIfnu2A+M2OqY4ZNW/xpS6ns/MurGP3+LjYNenw+S3PTg0KQBaSaGMPOHV2L fOaZkBA+GAJ++haxYEvE6xJ0PwQy4cxlkb7TcUzSvO/d5Kj6e8EjyTfgysiFGnUfWCfWY/ PHuZOYPP+YB03yMNIzfQrG11uvCA4F39NPk0N83c/GuIv45usW0HD+kp6D5wiw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1773821318; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KJJllZIdfOCt2UhzObpYMNZuUckLW1fvt01seU4y2w8=; b=f5Xd+rB+Uo+qsBuztph2kASuyxM87ljnPWkvFOGHmhF2GiZyjA1hGzpV377ugPrqFCbGJI eM2zaA+6Arv1uODw== From: "tip-bot2 for Dietmar Eggemann" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: sched/core] PM: EM: Switch to rcu_dereference_all() in wakeup path Cc: Dietmar Eggemann , "Peter Zijlstra (Intel)" , K Prateek Nayak , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <5b1228b7-5949-4a45-9f62-e8ce936de694@arm.com> References: <5b1228b7-5949-4a45-9f62-e8ce936de694@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <177382131676.1647592.1808719583497851268.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the sched/core branch of tip: Commit-ID: 8ca12326f592f7554acf2788ecb1c5c954dcf31c Gitweb: https://git.kernel.org/tip/8ca12326f592f7554acf2788ecb1c5c95= 4dcf31c Author: Dietmar Eggemann AuthorDate: Mon, 16 Mar 2026 00:36:22 +01:00 Committer: Peter Zijlstra CommitterDate: Wed, 18 Mar 2026 09:06:49 +01:00 PM: EM: Switch to rcu_dereference_all() in wakeup path em_cpu_energy() is part of the EAS (Fair) task wakeup path. Now that rcu_read_{,un}lock() have been removed from find_energy_efficient_cpu() switch to rcu_dereference_all() and check for rcu_read_lock_any_held() in em_cpu_energy() as well. In EAS (Fair) task wakeup path is a preempt/IRQ disabled region, so rcu_read_{,un}lock() can be removed. Signed-off-by: Dietmar Eggemann Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: K Prateek Nayak Link: https://patch.msgid.link/5b1228b7-5949-4a45-9f62-e8ce936de694@arm.com --- include/linux/energy_model.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/energy_model.h b/include/linux/energy_model.h index e7497f8..c909a8b 100644 --- a/include/linux/energy_model.h +++ b/include/linux/energy_model.h @@ -248,7 +248,7 @@ static inline unsigned long em_cpu_energy(struct em_per= f_domain *pd, struct em_perf_state *ps; int i; =20 - WARN_ONCE(!rcu_read_lock_held(), "EM: rcu read lock needed\n"); + lockdep_assert(rcu_read_lock_any_held()); =20 if (!sum_util) return 0; @@ -267,7 +267,7 @@ static inline unsigned long em_cpu_energy(struct em_per= f_domain *pd, * Find the lowest performance state of the Energy Model above the * requested performance. */ - em_table =3D rcu_dereference(pd->em_table); + em_table =3D rcu_dereference_all(pd->em_table); i =3D em_pd_get_efficient_state(em_table->state, pd, max_util); ps =3D &em_table->state[i]; =20