From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 4F4A92820A4 for ; Tue, 2 Dec 2025 16:14:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764692054; cv=none; b=UwH6KxXW9/RQqY0ryisSE98K9BKKoHmz8gs7I4SymzWUdw4FSc2zJ53Fgd4yz3237hbLQRzAdeIuj7wW9ocmNXJztPlVzs6BcErY2ADzYao0tCEgnxcP1R1MKjHNMfgQ0mZFVHyLfOYAsMRY51KNcVoxZhtAfXXPAmCPRnFesRg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764692054; c=relaxed/simple; bh=EKRfpqgpEqfls0xVpkdEikHnOfOu0HMcJv+pJantDWY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=WhwS7UBPPaixO1hJDw0K9ONk5uuDGexakNCJUsWLDE7q0+OuLSa8mdHQW6OMuhHyN3vtI4BVBuuT7o0LrcKuKuPrDYqtIJC3AMRMFrcrtalFuCyghOJD4ry4HYswr8pfumK3M4SBm6R3IeidgTpB2by4Hv6I/u12Co/a1dxi/tI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=nlxVbe+T; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="nlxVbe+T" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 50B31C4CEF1; Tue, 2 Dec 2025 16:14:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1764692053; bh=EKRfpqgpEqfls0xVpkdEikHnOfOu0HMcJv+pJantDWY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=nlxVbe+T238VBVzc3tJBRFODSb9h8egVV1s81bpr+IHLPl93V4aOI5pVNjIQqztl4 8+oGSUcpQAemxbH6uJF2WlnJCun4tSL7gWuOVHJkT1xKYN3AuOXZq/riguqy6vJFIM CfpLo0tO3RyI4RNUdVQ6SOVIyw7O9Xg/r3Foo3FBsTip3JL8eROqtpQJzqw3f17yPp J4SK/apSHK9BxuGo5yrY+lnrfKbdLPcmZCs4oYT6R6sw9hCEYHfV5VCFqm1dES+m3t epH0YYItNlc+i6ttCYznokdlBuv9mFcLpH7LqQZBFL8NPj11kuEiCg9zFImpxiwSnh T7MF88gJf18Jw== Date: Tue, 2 Dec 2025 17:14:08 +0100 From: Ingo Molnar To: Shrikanth Hegde Cc: peterz@infradead.org, vincent.guittot@linaro.org, linux-kernel@vger.kernel.org, kprateek.nayak@amd.com, dietmar.eggemann@arm.com, vschneid@redhat.com, rostedt@goodmis.org, tglx@linutronix.de, tim.c.chen@linux.intel.com, Frederic Weisbecker Subject: Re: [PATCH 4/4] sched/fair: Remove atomic nr_cpus and use cpumask instead Message-ID: References: <20251201183146.74443-1-sshegde@linux.ibm.com> <20251201183146.74443-5-sshegde@linux.ibm.com> <15f8f8c6-df8f-4218-a650-eaa8f7581d67@linux.ibm.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: * Shrikanth Hegde wrote: > > So I'd argue that reductions in both (A) and (B) > > are useful, but for different reasons. > > > > The *real* breakthrough in this area would be to > > reduce the unlimited upwards frequency of (2), by > > fundamentally changing the model of NOHZ idle > > balancing: > > > > For example by measuring the rate (frequency) of > > idle cycles on each CPU (this can be done without > > any cross-CPU logic), we would turn off NOHZ-idle > > for that CPU when the rate goes beyond a threshold. > > > > The resulting regular idle load-balancing passes > > will be rate-limited by balance intervals and won't > > be as aggressive as nohz_balance_enter+exit_idle(). > > (I hope...) > > > > Truly idle CPUs would go into NOHZ mode > > automatically, as their measured rate of idling > > drops below the threshold. > > > > Thoughts? > > Interesting. > > Let me see if i get this right. > > So track the idle duration over certain past > interval. If is below certain threshould mark those > CPUs in nohz state while doing idle entry/exit. If > not, reset their bits in nohz mask and don't update > the mask? > > I think rq->avg_idle there already and we do similar checks for newidle_balance. > sched_balance_newidle > ... > if (!get_rd_overloaded(this_rq->rd) || > this_rq->avg_idle < sd->max_newidle_lb_cost) { > > update_next_balance(sd, &next_balance); > rcu_read_unlock(); > goto out; > } Yeah, seems so - but I haven't put much thought into the idea, so caveat emptor. :-) Thanks, Ingo