From nobody Tue Sep 29 11:19:36 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 7EF7CDF6C; Sat, 8 Aug 2026 09:44:50 +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=1786182291; cv=none; b=UO4ppNCVIEAMXs4JuFyk3/7fz75jHE4CJK77A2ILl+qng3yNqIi83PntbVHZjuTXcVA3eAbK1UcSFyfSqK38Fw8OFBJeA/YMUYoWYt9T5lnvsmBPEMwn9Ke1OUME2c88i/ScDU5X14NJ979GPdCkjG31CemBdXBlncJk5geoeZU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786182291; c=relaxed/simple; bh=LanR0WLrBnn1DesA7JHJeDrn8fnaCcj4jKBRV66sytY=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=B71VlbXZ4FWyN0jNECNf3FlZUB0Xp9zVGFbufPGWDSrnxmVLSJ0MiE3w6Ge8l1TekHtrRIkIKwXsQuM5U6n/Q/OwiGNP8zgeuJ3ujaxIGOtb4/RnOvCGR/WuvJYIjHLEp/1QNORfCBmSdQPXSpdLmOHIsSS74v6n/a1SieqMiT0= 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=rjH9Fj2a; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=EEn8nt+T; 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="rjH9Fj2a"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="EEn8nt+T" Date: Sat, 08 Aug 2026 09:44:47 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1786182288; 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=++czHLqudUJmmVcj/XnfIEdZW568JfENrJfhJe4FZxM=; b=rjH9Fj2aSQjpgcQUsNvxo9yvhxPU9T2DugLnfHSY5mvxXgE2K8szYzkxJBEzVx/chASLnK C2V2XfI+JEBxaOI7qJjNjiKKZEbUtKgKvOZj2hYqOaIbcJK8k9+CaMwhUFrGYvAz4PtrlE Cn175aojENGkeVVvrq3zEOJiSaR6JTSe9OdTuF14L9XtYwhV7JJoAJiRhoxM888VMkO0ZS 1xTMpK0YoV5mfknzh4VSjvf8ydNEPOE2OKvK90S6t/qzZujPv4eE1gDP40LHOyzi6ic7eu o/G//vZL3345s4p2+DMLJ9x43XAh7c62awk+YaPZA+PvABbyPFf9b92IP8Lnug== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1786182288; 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=++czHLqudUJmmVcj/XnfIEdZW568JfENrJfhJe4FZxM=; b=EEn8nt+TGYjhyuBJ+0u2cIbM2QHbVB48HURSyJFR19mjfYCSURVlhH+xot+dQn82OKExlt SlvqEM26tOjybUDA== 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: Allow load balancing between CPUs of identical capacity Cc: Ricardo Neri , "Peter Zijlstra (Intel)" , Christian Loehle , Vincent Guittot , Andrea Righi , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260720-rneri-fix-cas-clusters-v6-5-bb500bf4afd4@linux.intel.com> References: <20260720-rneri-fix-cas-clusters-v6-5-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: <178618228711.442315.10087514024728899315.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: 7fd540b1bcaf59289e6e921463037d4eadc1d75b Gitweb: https://git.kernel.org/tip/7fd540b1bcaf59289e6e921463037d4ea= dc1d75b Author: Ricardo Neri AuthorDate: Mon, 20 Jul 2026 19:43:21 -07:00 Committer: Peter Zijlstra CommitterDate: Fri, 07 Aug 2026 18:27:11 +02:00 sched/fair: Allow load balancing between CPUs of identical capacity sched_balance_find_src_rq() avoids selecting a runqueue with a single running task as busiest if doing so results in migrating the task to a CPU with less than ~5% of extra capacity. It also unintentionally prevents migrations between CPUs of identical capacity. When CONFIG_SCHED_CLUSTER is enabled, load should be balanced across clusters of CPUs with the same capacity. Allowing migration between CPUs of identical capacity is necessary to meet this goal. Use get_actual_cpu_capacity() to reflect architectural capacity as well as diminished capacity due to hardware or cpufreq pressure. Guard this check with the sched_cluster_active static key so that systems without cluster topology are unaffected. Signed-off-by: Ricardo Neri Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Christian Loehle Reviewed-by: Vincent Guittot Tested-by: Christian Loehle Tested-by: Andrea Righi Link: https://patch.msgid.link/20260720-rneri-fix-cas-clusters-v6-5-bb500bf= 4afd4@linux.intel.com --- kernel/sched/fair.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index f1b4db3..dcf860c 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -13102,13 +13102,20 @@ static struct rq *sched_balance_find_src_rq(struc= t lb_env *env, */ if (env->sd->flags & SD_ASYM_CPUCAPACITY && nr_running =3D=3D 1) { + bool cluster_equal_cap =3D static_branch_unlikely(&sched_cluster_active= ) && + (get_actual_cpu_capacity(env->dst_cpu) =3D=3D + get_actual_cpu_capacity(i)); bool smt_degraded_cap =3D sched_smt_active() && !is_core_idle(i); =20 /* * Busy SMT siblings reduce the capacity of CPU @i. Do * not skip it in this case. + * + * CONFIG_SCHED_CLUSTER requires balancing load across + * clusters of identical capacity, accounting for + * hardware and cpufreq pressure. */ - if (!smt_degraded_cap && + if (!smt_degraded_cap && !cluster_equal_cap && !capacity_greater(capacity_of(env->dst_cpu), capacity)) continue; }