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 2E7CD3B19A9; Sat, 8 Aug 2026 09:44:52 +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=1786182293; cv=none; b=MhiWu3gb3+KkSeEQIaP5uYjzaySip1q3nib5elwyRHTf0ZS8uKrO5P/Noh6I+z1BNXjIKujCH3Qf5vVhveL/3Ti3aN3frEQSc0m5hhgi1LBKUbJQZ6kDgVIK9y/KbNqnsg1eLZkNzMWJx2WkZL8YbPIL/4StBG9qHyQqxX1H8fM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786182293; c=relaxed/simple; bh=jig27+wRFlRCwkt3/5UwaLQ10UfYInEtuiK+so7JrMQ=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=j1ConKxPyUcLFGhyHMP+XLhe4t5/CCh5B20QNxO2Xc1WqehUrsz6CFI5NVkRvdZegA8MsCxSRCmX5nsKNArDNg4AkP+Fx8+m9dUnBGMpO0WF8G/phB7rMUjRSodzrF2Qru1xO50sD7zUPu4xmwjj65yEocHSz48JnwrRBG5eCzc= 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=b4tSsoPT; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=MNK1qr6E; 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="b4tSsoPT"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="MNK1qr6E" Date: Sat, 08 Aug 2026 09:44:48 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1786182290; 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=J1qeG+uAr0nYFzemM18lKT2JPafHZWH9Lkhb+vnPvM0=; b=b4tSsoPT/sl+UqDWgivN8I8UVRT5zAsyQiMZQkVFHZszs4vVTkdlf+A5Txqcu3v0e8Gcfn mGgES8x3M9WAutFgQs+VjTaiWcR9Cx7EaeCWWI/AyhX88p8TP0prh299FnviPZU8/uS5cU GqvTPmkDxwdpYCMlvnuQETVNfKoeJiko21RaPPAy78+vs9spuIY92FNitXvEb1xy+oVKj5 +7pv+HzVfmaE7byBu6o1J8pfCIW9Ly7bb8dCE+Y9d+tlY3MwAELSKHyeAIbX0nWyllQYFu EUbuSHgPiB14p3nL9hdvFaX4Jk19d+7plaFzG6svQ1zXhkzwc4xkn0k+KEQDEQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1786182290; 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=J1qeG+uAr0nYFzemM18lKT2JPafHZWH9Lkhb+vnPvM0=; b=MNK1qr6EKrXq2V/b+JHEQr1PW06X4yZHrnWZsNfyoj1HVFnV31a023CZOyTRgwVOaaxA3y /mgKyHDJ+nRU1yDA== 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: Skip misfit load accounting when the destination CPU cannot help Cc: Ricardo Neri , "Peter Zijlstra (Intel)" , Christian Loehle , Chen Yu , Vincent Guittot , Andrea Righi , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260720-rneri-fix-cas-clusters-v6-4-bb500bf4afd4@linux.intel.com> References: <20260720-rneri-fix-cas-clusters-v6-4-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: <178618228861.442315.4165159793622202987.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: 0fbd428d078876cefe908efdbee47a4d5adc5f24 Gitweb: https://git.kernel.org/tip/0fbd428d078876cefe908efdbee47a4d5= adc5f24 Author: Ricardo Neri AuthorDate: Mon, 20 Jul 2026 19:43:20 -07:00 Committer: Peter Zijlstra CommitterDate: Fri, 07 Aug 2026 18:27:10 +02:00 sched/fair: Skip misfit load accounting when the destination CPU cannot help In domains with asymmetric capacity, identifying misfit load in a scheduling group is not useful when the destination CPU cannot help (i.e., its capacity exceeds the group's maximum CPU capacity by less than ~5%). In such cases, it also prevents load balance among clusters of equal capacity when CONFIG_SCHED_CLUSTER is enabled. This happens because update_sd_pick_busiest() skips candidate groups of type misfit_task if the destination CPU has similar capacity. Skipping misfit load accounting in this situation allows the group to be classified as has_spare or fully_busy and lets load balancing proceed. Keep marking scheduling groups as overloaded when misfit tasks are present. The sg_overloaded flag propagates to the root domain and allows bigger CPUs in it to help via newly idle balance. Signed-off-by: Ricardo Neri Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Christian Loehle Reviewed-by: Chen Yu Reviewed-by: Vincent Guittot Tested-by: Christian Loehle Tested-by: Andrea Righi Link: https://patch.msgid.link/20260720-rneri-fix-cas-clusters-v6-4-bb500bf= 4afd4@linux.intel.com --- kernel/sched/fair.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index f9d0edd..f1b4db3 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -11970,12 +11970,25 @@ static inline void update_sg_lb_stats(struct lb_e= nv *env, continue; =20 if (sd_flags & SD_ASYM_CPUCAPACITY) { - /* Check for a misfit task on the cpu */ - if (sgs->group_misfit_task_load < rq->misfit_task_load) { - sgs->group_misfit_task_load =3D rq->misfit_task_load; - + if (rq->misfit_task_load) { + /* + * Always mark the root domain overloaded so big + * CPUs can pick up misfit tasks via newly idle + * balance. + */ if (balancing_at_rd) *sg_overloaded =3D 1; + + /* + * Only account misfit load if @dst_cpu can + * help; otherwise, the group may be classified + * as misfit_task and update_sd_pick_busiest() + * will skip it. + */ + if (capacity_greater(capacity_of(env->dst_cpu), + group->sgc->max_capacity) && + (sgs->group_misfit_task_load < rq->misfit_task_load)) + sgs->group_misfit_task_load =3D rq->misfit_task_load; } } else if (env->idle && sched_reduced_capacity(rq, env->sd)) { /* Check for a task running on a CPU with reduced capacity */