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: <20180626093820.GG2494@hirez.programming.kicks-ass.net>
Date:   Tue, 26 Jun 2018 11:38:20 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Cc:     linux-kernel@...r.kernel.org, mingo@...nel.org,
        jiangshanlai@...il.com, dipankar@...ibm.com,
        akpm@...ux-foundation.org, mathieu.desnoyers@...icios.com,
        josh@...htriplett.org, tglx@...utronix.de, rostedt@...dmis.org,
        dhowells@...hat.com, edumazet@...gle.com, fweisbec@...il.com,
        oleg@...hat.com, joel@...lfernandes.org,
        Boqun Feng <boqun.feng@...il.com>
Subject: Re: [PATCH tip/core/rcu 2/2] rcu: Make expedited GPs handle CPU 0
 being offline

On Mon, Jun 25, 2018 at 03:43:32PM -0700, Paul E. McKenney wrote:
> +		preempt_disable();
> +		for_each_leaf_node_possible_cpu(rnp, cpu) {
> +			if (cpu_is_offline(cpu)) /* Preemption disabled. */
> +				continue;

Create for_each_node_online_cpu() instead? Seems a bit pointless to
iterate possible mask only to then check it against the online mask.
Just iterate the online mask directly.

Or better yet, write this as:

	preempt_disable();
	cpu = cpumask_next(rnp->grplo - 1, cpu_online_mask);
	if (cpu > rnp->grphi)
		cpu = WORK_CPU_UNBOUND;
	queue_work_on(cpu, rcu_par_gp_wq, &rnp->rew.rew_work);
	preempt_enable();

Which is what it appears to be doing.

> +			queue_work_on(cpu, rcu_par_gp_wq, &rnp->rew.rew_work);
> +			rnp->exp_need_flush = true;
> +			break;
> +		}
> +		preempt_enable();
> +		if (!rnp->exp_need_flush) { /* All offline, report QSes. */
> +			queue_work(rcu_par_gp_wq, &rnp->rew.rew_work);
> +			rnp->exp_need_flush = true;
> +		}
>  	}
>  
>  	/* Wait for workqueue jobs (if any) to complete. */
> -- 
> 2.17.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ