From nobody Tue Sep 29 11:55:38 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 7FCBCDF6C; Sat, 8 Aug 2026 09:44:56 +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=1786182298; cv=none; b=Viwyy0DGNbptpaT5vH6rl14xL4S4oKZIQoEvv0svBa025zoc2erbf01OfCC0AvHKGhbwGRpHVEAFUYLtAIZWdIxMVHTWZVlstJVXO7NZhvB8E3lukkbRHGThpB+I6uuUaVgFPJxHhYKHfUQs3pUaYeEPSodvIyWMpQ4wUIgh/cY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786182298; c=relaxed/simple; bh=w5MU+0wXo9aX+3Ti/aRKhWAJWyxLQ9og1OtmTr3nNuY=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=rw/JKF/nVSLvl5BnQZ13x33r/Uc4Pz7DI2UQdfzYVeuzjFqfP0wmPfNnSLVBhaefRRxNQ+/p5AFLWQ4v9jTt0YDCn8uD5+Vh3Rkx36FmHg1fGEVuwSsGtPEpmtYVGvW/y7wmUNKj5pQCa3CilRZpRnfRoZS/WxqCnUEP4MvGlg4= 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=VszSS1G8; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=MXj2VTuG; 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="VszSS1G8"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="MXj2VTuG" Date: Sat, 08 Aug 2026 09:44:52 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1786182294; 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=EXN0FU+wS1pXdUQojO3/o04GS2R+cded9tXskeMfkzw=; b=VszSS1G8RiBrC8YVDrZgEvukXqvhle5wQp2En8FC6WPZ2qhO/muKzYCmq3IafEIz2xRI9e v0HezbK1tlcBMDk1Y2sHt9O2j87wchTH69O459rP7IWcRgrGDYWsFEY+EsqcnJep48zAhb CqRsmvUowdn+IjGU/WzWSqVk2GdQmJty5YZHcpzOijd4YQgBMf7HxulYu1al0ZAZTSKkT3 qWSQu5SsnZ5xOXjIDNRsn12q8YwH2FfSkTrb40mw7lxkz+i6uiVGl+raV065vSiq/P0/k2 V20sCF47NQG2HroIDFHWwBHC7dsPnoASk8cIi7E+SaeAAenkZP4LGh8lYlbStA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1786182294; 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=EXN0FU+wS1pXdUQojO3/o04GS2R+cded9tXskeMfkzw=; b=MXj2VTuGghV6g1mZA3qhoenDjQF5Fy26jLD4WszTiWGeKyO45VQ6a7MAEBXdzEHaw0dmId JdCCQVAvgCceHkCA== From: "tip-bot2 for Ricardo Neri" 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: Do not skip CPUs of similar capacity with busy SMT siblings Cc: Ricardo Neri , "Peter Zijlstra (Intel)" , K Prateek Nayak , Vincent Guittot , Andrea Righi , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260720-rneri-fix-cas-clusters-v6-1-bb500bf4afd4@linux.intel.com> References: <20260720-rneri-fix-cas-clusters-v6-1-bb500bf4afd4@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <178618229254.442315.16915260462174352013.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: 180ff97c186971c2106e68470e4370ace0b8fbbc Gitweb: https://git.kernel.org/tip/180ff97c186971c2106e68470e4370ace= 0b8fbbc Author: Ricardo Neri AuthorDate: Mon, 20 Jul 2026 19:43:17 -07:00 Committer: Peter Zijlstra CommitterDate: Fri, 07 Aug 2026 18:27:09 +02:00 sched/fair: Do not skip CPUs of similar capacity with busy SMT siblings When picking a busiest CPU with only one running task, the function sched_balance_find_src_rq() skips candidate CPUs if the destination CPU has less than ~5% extra capacity. This condition only holds if all the SMT siblings of a CPU are idle. SMT siblings share the computing resources of a physical core and this results in reduced capacity if more than one sibling is busy. Skipping a CPU as described would prevent the load balancer from pulling tasks from a scheduling group previously and correctly identified as group_smt_balance (i.e., one with more than one task running). Do not skip a candidate CPU of similar capacity if it has busy SMT siblings. Signed-off-by: Ricardo Neri Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: K Prateek Nayak Reviewed-by: Vincent Guittot Tested-by: Andrea Righi Link: https://patch.msgid.link/20260720-rneri-fix-cas-clusters-v6-1-bb500bf= 4afd4@linux.intel.com --- kernel/sched/fair.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index a24dd20..974e091 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -13086,9 +13086,17 @@ static struct rq *sched_balance_find_src_rq(struct= lb_env *env, * average load. */ if (env->sd->flags & SD_ASYM_CPUCAPACITY && - !capacity_greater(capacity_of(env->dst_cpu), capacity) && - nr_running =3D=3D 1) - continue; + nr_running =3D=3D 1) { + bool smt_degraded_cap =3D sched_smt_active() && !is_core_idle(i); + + /* + * Busy SMT siblings reduce the capacity of CPU @i. Do + * not skip it in this case. + */ + if (!smt_degraded_cap && + !capacity_greater(capacity_of(env->dst_cpu), capacity)) + continue; + } =20 /* * Make sure we only pull tasks from a CPU of lower priority