From nobody Mon May 25 00:09:52 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 ED04E3BCD05; Wed, 20 May 2026 08:34:04 +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=1779266046; cv=none; b=f203h7pMtPbPrdqtiQTk/BkPPlrM63vYiBHHtx67zxb8Lc/gyOk2b4XGF/8MpQLijIooWj8j+DTfrIQBYDXUqsE8RHoYWA42emsIc9gCxVwinuqLlPzm/kyPesr2bgF54BOXVNqYNdmv/01WGjPJi9jvUFJHQBgWN6XeiKogcRY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779266046; c=relaxed/simple; bh=cFpFSNhPsSb5PL4VOyrnTu2v02LfG7OrreIPPKujDzU=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=f313u+NoYO+GtcylG+0LfTRYILvRMfKTLS4v0NNNdRHaAaaN07SZuAflaveWNj96rhDHMFgen8L4Qe0EC4pwtXpraJs4l7YF7eKC5AZYqLlvhlmtI/it+fQXi3M5CWS9FSJbErq6BV7y43GaagTTXX6tFSlh8no0E9D0DjvoMCE= 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=KehtFsdB; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=LMkxg4cP; 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="KehtFsdB"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="LMkxg4cP" Date: Wed, 20 May 2026 08:34:02 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1779266043; 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=Mlf44pkeTOjDEdgyU03MLd/7hyxGTs3NmawJoPrNiQo=; b=KehtFsdBFyi/AHEZxxpgOJmkyENZ9HW8fTrZ/oetlRH5uG0THgXr8kJKTWTX4Tx5kiXqUZ PoGIrCExUNtC3u9NgFMYiYnoJsjt/YnkwKgh7rE5U8DVvN9IbGyxkmVtqVDKyzpI4KcCV4 UTDBUrPFJmX1gAgFp3Bp2YbKmhnvsb0ySHs+LMhp+sRvWMNdBQTua61ZYSu2zAukU9+Cxm qWaNTLN4KpsBbTfopZSxiFwx0UrWJ6dgt6ELBCYSYSvW95SzHZuSnbX8clpIRK7D91nay5 mns/7lFXzggIb+lb6YVl7uKsC9CXwmm23bmuQInDj3/rHR8Eg9IFZV6LVpe3Ww== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1779266043; 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=Mlf44pkeTOjDEdgyU03MLd/7hyxGTs3NmawJoPrNiQo=; b=LMkxg4cPPkMWiQemSwRQajPCkunsiHlY8A8Aq0oPAme2iip/n3SyiJ6EBX8ihiLlIcb/VP o+bvbZuI6adKxuCQ== From: "tip-bot2 for Andrea Righi" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: sched/core] sched/fair: Reject misfit pulls onto busy SMT siblings on asym-capacity Cc: Felix Abecassis , Andrea Righi , "Peter Zijlstra (Intel)" , Vincent Guittot , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260509180955.1840064-5-arighi@nvidia.com> References: <20260509180955.1840064-5-arighi@nvidia.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <177926604214.711.11082011326918710602.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: bf6aa722198d3c06e4236e8c5a480f30a64e1513 Gitweb: https://git.kernel.org/tip/bf6aa722198d3c06e4236e8c5a480f30a= 64e1513 Author: Andrea Righi AuthorDate: Sat, 09 May 2026 20:07:28 +02:00 Committer: Peter Zijlstra CommitterDate: Tue, 19 May 2026 12:17:38 +02:00 sched/fair: Reject misfit pulls onto busy SMT siblings on asym-capacity When SD_ASYM_CPUCAPACITY load balancing considers pulling a misfit task, capacity_of(dst_cpu) can overstate available compute if the SMT sibling is busy: the core does not deliver its full nominal capacity. If SMT is active and dst_cpu is not on a fully idle core, skip this destination so we do not migrate a misfit expecting a capacity upgrade we cannot actually provide. Reported-by: Felix Abecassis Signed-off-by: Andrea Righi Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Vincent Guittot Link: https://patch.msgid.link/20260509180955.1840064-5-arighi@nvidia.com --- kernel/sched/fair.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 8854d4d..f69ee5a 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -9625,6 +9625,7 @@ struct lb_env { =20 int dst_cpu; struct rq *dst_rq; + bool dst_core_idle; =20 struct cpumask *dst_grpmask; int new_dst_cpu; @@ -10850,10 +10851,16 @@ static bool update_sd_pick_busiest(struct lb_env = *env, * We can use max_capacity here as reduction in capacity on some * CPUs in the group should either be possible to resolve * internally or be covered by avg_load imbalance (eventually). + * + * When SMT is active, only pull a misfit to dst_cpu if it is on a + * fully idle core; otherwise the effective capacity of the core is + * reduced and we may not actually provide more capacity than the + * source. */ if ((env->sd->flags & SD_ASYM_CPUCAPACITY) && (sgs->group_type =3D=3D group_misfit_task) && - (!capacity_greater(capacity_of(env->dst_cpu), sg->sgc->max_capacity) = || + (!env->dst_core_idle || + !capacity_greater(capacity_of(env->dst_cpu), sg->sgc->max_capacity) = || sds->local_stat.group_type !=3D group_has_spare)) return false; =20 @@ -11417,6 +11424,8 @@ static inline void update_sd_lb_stats(struct lb_env= *env, struct sd_lb_stats *sd unsigned long sum_util =3D 0; bool sg_overloaded =3D 0, sg_overutilized =3D 0; =20 + env->dst_core_idle =3D !sched_smt_active() || is_core_idle(env->dst_cpu); + do { struct sg_lb_stats *sgs =3D &tmp_sgs; int local_group;