From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 63FCF309EE1 for ; Fri, 14 Nov 2025 11:05:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.92.199 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763118327; cv=none; b=ociz6kl6peP4rxtBKQE+2XP28vDQntXXUz+l9oOhCf1E4M2dveVL+/gXHvd4LrF6iEgOGo14jLth39So+Wz0yIyXzoGKkw8zb4XLi4Y40xGA4gCzO3PqxPe+v19Is8W7/J5V8HyPvjIzyOPIBQZ+xuSuXxJ5GKC079qkSTLIcRk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763118327; c=relaxed/simple; bh=NVGEGzxmwIrRYtKK/AdbEAwMlvl5ppAP1QQvyKs1poY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=NU0TsuVRUdubJa+XRDKSDzNKzzRyMQzCRBB7ClAIGEMDsl8mHrWddAcXoJxbTsYvEtNK6IJd5IlRtrV9VOWRqWiRI5c632KBVSUTbn6lDDDW+/RtNWk7wxNsdZPdnwXKdnwMauNARW0feYW5v2/3df8xCWlmsWoA3MwNxgR9EdY= 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=BLdFgxdT; arc=none smtp.client-ip=90.155.92.199 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="BLdFgxdT" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; 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=NVGEGzxmwIrRYtKK/AdbEAwMlvl5ppAP1QQvyKs1poY=; b=BLdFgxdTrEAi3q8uo4QogPNtSL lXHgxaBBVOv1VbzpdzoUFXLv+TK4vlKDe7+nckm+hE+NC+JKDZjMS5crKx9osmE7qkXzjwdekVZ+Q gVxe3Z4wQyaVi3nDcG2GeLn9Tive/rrA17nz8M1YBsBakkLZz3+5N0tjC8b6Um1qnh3Z8A0Zs6wnz uWqMCHfzF9+AMVlUOdmYhB3tlEcxbt6RepwOJbb5R6C8HMG0GL9/ri+8du5vAQ0MOdM2xdRn1KtrC lKgEtf6tfy3XYIo5mpa7kF6jCIoEfGVUMBPu6bgBFN443D57w7dAkrMq53T0hNP5hwado5evKgvY+ TP7D587w==; Received: from 77-249-17-252.cable.dynamic.v4.ziggo.nl ([77.249.17.252] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.98.2 #2 (Red Hat Linux)) id 1vJqkT-00000002MzO-1cuO; Fri, 14 Nov 2025 10:09:45 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id E8F7B30023C; Fri, 14 Nov 2025 12:05:10 +0100 (CET) Date: Fri, 14 Nov 2025 12:05:10 +0100 From: Peter Zijlstra To: Vincent Guittot Cc: Shrikanth Hegde , mingo@redhat.com, juri.lelli@redhat.com, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, vschneid@redhat.com, linux-kernel@vger.kernel.org, Chris Mason , Joseph Salisbury , Adam Li , Hazem Mohamed Abuelfotoh , Josh Don Subject: Re: [PATCH 2/4] sched/fair: Small cleanup to sched_balance_newidle() Message-ID: <20251114110510.GT278048@noisy.programming.kicks-ass.net> References: <20251107160645.929564468@infradead.org> <20251107161739.525916173@infradead.org> <2acd7c1d-e2b4-40a0-85de-55f9b2635dad@linux.ibm.com> <20251112144241.GP278048@noisy.programming.kicks-ass.net> <20251112150818.GG4068168@noisy.programming.kicks-ass.net> <01dcb63e-9ebd-42ca-9418-a822bf081bfc@linux.ibm.com> <20251114094901.GH3245006@noisy.programming.kicks-ass.net> 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: On Fri, Nov 14, 2025 at 11:22:48AM +0100, Vincent Guittot wrote: > sched_balance_update_blocked_averages() can be costly so we want to > include it in the sd->max_idle_balance_cost so we skip newidle lb and > update blocked load if avg_idle is shorter than doin the update and > the newidle lb of the 1st level Ah, fair enough. > when sd is null we should still skip > sched_balance_update_blocked_averages() is its cost is higher than > avg_idle but it seems that we don't. When !sd there is no balancing to be had. Anyway, I'll keep the patch as is -- introducing an early exit for !sd and I'll post a few more cleanups after this.