From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (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 28B3F2B9B9 for ; Fri, 28 Nov 2025 11:14:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764328477; cv=none; b=F0YZnPUMU3zVX2j/Cnc/18BaDDP0X4Off+P1U8V6cVN6+eDRQ3EwNr6YDLbsZJ2un4mIkAYO3mNAJ1j00HOD6gClC5emmybSL0yId1VNiWfC1Ohs+TScpZqSf9G4m2h72eP8T33BjGpWlPm1NrUb6pJfkJJjMGcLxdBskt8o5to= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764328477; c=relaxed/simple; bh=cnrWGhoOCYAFt9jw7XCbn6xkkllrTGuzmSFmNXjRD5w=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Ujkn+HTgVa77Id5ggBxsLnYXYyTqcC2KhCbj4LOmoY2uO1RcOoHqrPygsHxlExApuDbi6wCPu7yRL0z8Je9UYibKxulY2djG+eXj6eRoYRoeUvFdwbAp3pX9ZO89uEcK67ZZdty9tFx3dOZJ9JBiKVLoQKAw+iOZhRiTBAkGNpE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=gEiMNzGn; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="gEiMNzGn" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=S/IKkK5iJ2oV87hKYWvwD6XPwYhYKwWGaq+dgkp+T80=; b=gEiMNzGnmz5R77eSu2HOmIxk0l TJFyE5QTO0eZesGokX2IBOwzkoWRUgkqfoi39h9mbhfWlhnPf8WOguCnkY2iXMOf0m1a3oivC9S0V KoYbRCYMhzT8Sepb1MPTuiqcGqReczCkoK77G09gk+Vwtwaz3Y53D/aM3MfmLQitjwQGkU+bhapzc hkERsqj7XDIdNkdSvTCLEKR8VWyfksuTXoUqB+J+MRoo8gdJXScnp+yFrwVbY/bUKyH/8Fthn2H+b RLGXw1fMZGYauz7uBI8lamdkfPHL+TiE+9N16m4PL1nlXkfWnfZXKBCR7HhBO3Oaqm0jO+J1OnBiN SmRFnT1w==; Received: from 77-249-17-252.cable.dynamic.v4.ziggo.nl ([77.249.17.252] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.98.2 #2 (Red Hat Linux)) id 1vOwQm-0000000D6v5-0aPg; Fri, 28 Nov 2025 11:14:28 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id A53A1300230; Fri, 28 Nov 2025 12:14:27 +0100 (CET) Date: Fri, 28 Nov 2025 12:14:27 +0100 From: Peter Zijlstra To: Fernand Sieber Cc: mingo@redhat.com, linux-kernel@vger.kernel.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, vschneid@redhat.com, kprateek.nayak@amd.com, dwmw@amazon.co.uk, jschoenh@amazon.de, liuyuxua@amazon.com, abusse@amazon.com, gmazz@amazon.com, rkagan@amazon.com Subject: Re: [PATCH] sched/fair: Force idle aware load balancing Message-ID: <20251128111427.GJ3245006@noisy.programming.kicks-ass.net> References: <20251127202719.963766-1-sieberf@amazon.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20251127202719.963766-1-sieberf@amazon.com> On Thu, Nov 27, 2025 at 10:27:17PM +0200, Fernand Sieber wrote: > @@ -11123,7 +11136,8 @@ static inline void calculate_imbalance(struct lb_env *env, struct sd_lb_stats *s > return; > } > > - if (busiest->group_type == group_smt_balance) { > + if (busiest->group_type == group_smt_balance || > + busiest->forceidle_weight) { Should we not instead make it so that we select group_smt_balance in this case? Anyway, the patch doesn't seem horrible to me. Vincent? > /* Reduce number of tasks sharing CPU capacity */ > env->migration_type = migrate_task; > env->imbalance = 1;