lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f9546172-95e7-498d-9fca-18ff142f0bbb@linux.ibm.com>
Date: Thu, 25 Sep 2025 01:32:36 +0530
From: Shrikanth Hegde <sshegde@...ux.ibm.com>
To: K Prateek Nayak <kprateek.nayak@....com>,
        Peter Zijlstra <peterz@...radead.org>
Cc: Dietmar Eggemann <dietmar.eggemann@....com>,
        Steven Rostedt <rostedt@...dmis.org>, Ben Segall <bsegall@...gle.com>,
        Mel Gorman <mgorman@...e.de>, Valentin Schneider <vschneid@...hat.com>,
        "Gautham R. Shenoy" <gautham.shenoy@....com>,
        Swapnil Sapkal <swapnil.sapkal@....com>,
        Ingo Molnar <mingo@...hat.com>, Juri Lelli <juri.lelli@...hat.com>,
        Vincent Guittot <vincent.guittot@...aro.org>,
        Anna-Maria Behnsen <anna-maria@...utronix.de>,
        Frederic Weisbecker <frederic@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>, linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH 18/19] sched/fair: Optimize global "nohz.nr_cpus"
 tracking



On 9/4/25 9:45 AM, K Prateek Nayak wrote:
> Optimize "nohz.nr_cpus" by tracking number of "sd_nohz->shared" with
> non-zero "nr_idle_cpus" count via "nohz.nr_doms" and only updating at
> the boundary of "sd_nohz->shared->nr_idle_cpus" going from 0 -> 1 and
> back from 1 -> 0.
> 
> This also introduces a chance of double accounting when a nohz idle
> entry or the tick races with hotplug or cpuset as described in
> __nohz_exit_idle_tracking().
> 
> __nohz_exit_idle_tracking() called when the sched_domain_shared nodes
> tracking idle CPUs are freed is used to correct any potential double
> accounting which can unnecessarily trigger nohz idle balances even when
> all the CPUs have tick enabled.
> 
Is it possible to get rid of this nr_cpus or nr_doms altogether?

The reason being, with current code, one updates the nohz.idle_cpus_mask and
then inc/dec nr_cpus.

The only use it to decide to do periodic idle balancing or not.
If instead, could use cpumask_empty(nohz.idle_cpus_mask) check no?
It may not be every tick accurate, but that may be ok.

I haven't gone through your series in detail yet, but similar thing is doable,
check if the list is empty or not.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ