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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171220142202.2x7yx3w43wxfel7d@hirez.programming.kicks-ass.net>
Date:   Wed, 20 Dec 2017 15:22:02 +0100
From:   Peter Zijlstra <peterz@...radead.org>
To:     Brendan Jackman <brendan.jackman@....com>
Cc:     Vincent Guittot <vincent.guittot@...aro.org>,
        Dietmar Eggemann <dietmar.eggemann@....com>,
        Ingo Molnar <mingo@...nel.org>, linux-kernel@...r.kernel.org,
        Ingo Molnar <mingo@...hat.com>,
        Morten Rasmussen <morten.rasmussen@....com>
Subject: Re: [PATCH v2 2/2] sched/fair: Update blocked load from newly idle
 balance

On Fri, Dec 01, 2017 at 06:01:57PM +0000, Brendan Jackman wrote:
> @@ -7913,6 +7928,29 @@ static inline void update_sd_lb_stats(struct lb_env *env, struct sd_lb_stats *sd
>  	if (child && child->flags & SD_PREFER_SIBLING)
>  		prefer_sibling = 1;
>  
> +#ifdef CONFIG_NO_HZ_COMMON
> +	if (env->idle == CPU_NEWLY_IDLE) {
> +		int cpu;
> +
> +		/* Update the stats of NOHZ idle CPUs in the sd */
> +		for_each_cpu_and(cpu, sched_domain_span(env->sd),
> +				 nohz.idle_cpus_mask) {
> +			struct rq *rq = cpu_rq(cpu);
> +
> +			/* ... Unless we've already done since the last tick */
> +			if (time_after(jiffies, rq->last_blocked_load_update_tick))
> +				update_blocked_averages(cpu);
> +		}
> +	}
> +	/*
> +	 * If we've just updated all of the NOHZ idle CPUs, then we can push
> +	 * back the next nohz.next_update, which will prevent an unnecessary
> +	 * wakeup for the nohz stats kick
> +	 */
> +	if (cpumask_subset(nohz.idle_cpus_mask, sched_domain_span(env->sd)))
> +		nohz.next_update = jiffies + LOAD_AVG_PERIOD;
> +#endif
> +
>  	load_idx = get_sd_load_idx(env->sd, env->idle);
>  
>  	do {

We're already going to be iterating all those CPUs through
update_sg_lb_stats(), why not push it all the way down there and avoid
the double iteration?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ