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]
Date:	Sun, 16 Feb 2014 08:17:45 -0800
From:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To:	Christoph Lameter <cl@...ux.com>
Cc:	Tejun Heo <tj@...nel.org>, akpm@...uxfoundation.org,
	rostedt@...dmis.org, linux-kernel@...r.kernel.org,
	Ingo Molnar <mingo@...nel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Dipankar Sarma <dipankar@...ibm.com>
Subject: Re: [PATCH 24/48] rcu: Replace __this_cpu_ptr uses with raw_cpu_ptr

On Fri, Feb 14, 2014 at 02:19:05PM -0600, Christoph Lameter wrote:
> [Patch depends on another patch in this series that introduces raw_cpu_ops]
> 
> __this_cpu_ptr is being phased out.
> 
> One special case is increment_cpu_stall_ticks().
> A per cpu variable is incremented so use raw_cpu_inc().
> 
> Cc: Dipankar Sarma <dipankar@...ibm.com>
> Cc: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
> Signed-off-by: Christoph Lameter <cl@...ux.com>

Acked-by: Paul E. McKenney <paulmck@...ux.vnet.ibm.com>

> Index: linux/kernel/rcu/tree.c
> ===================================================================
> --- linux.orig/kernel/rcu/tree.c	2014-02-03 13:23:21.855072103 -0600
> +++ linux/kernel/rcu/tree.c	2014-02-03 13:23:21.845072311 -0600
> @@ -1951,7 +1951,7 @@
>  static void rcu_adopt_orphan_cbs(struct rcu_state *rsp, unsigned long flags)
>  {
>  	int i;
> -	struct rcu_data *rdp = __this_cpu_ptr(rsp->rda);
> +	struct rcu_data *rdp = raw_cpu_ptr(rsp->rda);
> 
>  	/* No-CBs CPUs are handled specially. */
>  	if (rcu_nocb_adopt_orphan_cbs(rsp, rdp, flags))
> @@ -2334,7 +2334,7 @@
>  __rcu_process_callbacks(struct rcu_state *rsp)
>  {
>  	unsigned long flags;
> -	struct rcu_data *rdp = __this_cpu_ptr(rsp->rda);
> +	struct rcu_data *rdp = raw_cpu_ptr(rsp->rda);
> 
>  	WARN_ON_ONCE(rdp->beenonline == 0);
> 
> @@ -2936,7 +2936,7 @@
>  static void rcu_barrier_func(void *type)
>  {
>  	struct rcu_state *rsp = type;
> -	struct rcu_data *rdp = __this_cpu_ptr(rsp->rda);
> +	struct rcu_data *rdp = raw_cpu_ptr(rsp->rda);
> 
>  	_rcu_barrier_trace(rsp, "IRQ", -1, rsp->n_barrier_done);
>  	atomic_inc(&rsp->barrier_cpu_count);
> Index: linux/kernel/rcu/tree_plugin.h
> ===================================================================
> --- linux.orig/kernel/rcu/tree_plugin.h	2014-02-03 13:23:21.855072103 -0600
> +++ linux/kernel/rcu/tree_plugin.h	2014-02-03 13:23:21.845072311 -0600
> @@ -1848,7 +1848,7 @@
>  	struct rcu_data *rdp;
> 
>  	for_each_rcu_flavor(rsp) {
> -		rdp = __this_cpu_ptr(rsp->rda);
> +		rdp = raw_cpu_ptr(rsp->rda);
>  		if (rdp->qlen_lazy != 0) {
>  			atomic_inc(&oom_callback_count);
>  			rsp->call(&rdp->oom_head, rcu_oom_callback);
> @@ -1990,7 +1990,7 @@
>  	struct rcu_state *rsp;
> 
>  	for_each_rcu_flavor(rsp)
> -		__this_cpu_ptr(rsp->rda)->ticks_this_gp++;
> +		raw_cpu_inc(rsp->rda->ticks_this_gp);
>  }
> 
>  #else /* #ifdef CONFIG_RCU_CPU_STALL_INFO */
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ