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: <20120615233735.GC7613@leaf>
Date:	Fri, 15 Jun 2012 16:37:35 -0700
From:	Josh Triplett <josh@...htriplett.org>
To:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Cc:	linux-kernel@...r.kernel.org, mingo@...e.hu, laijs@...fujitsu.com,
	dipankar@...ibm.com, akpm@...ux-foundation.org,
	mathieu.desnoyers@...ymtl.ca, niv@...ibm.com, tglx@...utronix.de,
	peterz@...radead.org, rostedt@...dmis.org, Valdis.Kletnieks@...edu,
	dhowells@...hat.com, eric.dumazet@...il.com, darren@...art.com,
	fweisbec@...il.com, patches@...aro.org
Subject: Re: [PATCH tip/core/rcu 12/15] rcu: Remove unneeded
 __rcu_process_callbacks() argument

On Fri, Jun 15, 2012 at 02:06:07PM -0700, Paul E. McKenney wrote:
> From: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
> 
> With the advent of __this_cpu_ptr(), it is no longer necessary to pass
> both the rcu_state and rcu_data structures into __rcu_process_callbacks().
> This commit therefore computes the rcu_data pointer from the rcu_state
> pointer within __rcu_process_callbacks() so that callers can pass in
> only the pointer to the rcu_state structure.  This paves the way for
> linking the rcu_state structures together and iterating over them.
> 
> Signed-off-by: Paul E. McKenney <paulmck@...ux.vnet.ibm.com>

Reviewed-by: Josh Triplett <josh@...htriplett.org>

>  kernel/rcutree.c        |    8 ++++----
>  kernel/rcutree_plugin.h |    3 +--
>  2 files changed, 5 insertions(+), 6 deletions(-)
> 
> diff --git a/kernel/rcutree.c b/kernel/rcutree.c
> index ebd5223..bd4e41c 100644
> --- a/kernel/rcutree.c
> +++ b/kernel/rcutree.c
> @@ -1785,9 +1785,10 @@ unlock_fqs_ret:
>   * whom the rdp belongs.
>   */
>  static void
> -__rcu_process_callbacks(struct rcu_state *rsp, struct rcu_data *rdp)
> +__rcu_process_callbacks(struct rcu_state *rsp)
>  {
>  	unsigned long flags;
> +	struct rcu_data *rdp = __this_cpu_ptr(rsp->rda);
>  
>  	WARN_ON_ONCE(rdp->beenonline == 0);
>  
> @@ -1824,9 +1825,8 @@ __rcu_process_callbacks(struct rcu_state *rsp, struct rcu_data *rdp)
>  static void rcu_process_callbacks(struct softirq_action *unused)
>  {
>  	trace_rcu_utilization("Start RCU core");
> -	__rcu_process_callbacks(&rcu_sched_state,
> -				&__get_cpu_var(rcu_sched_data));
> -	__rcu_process_callbacks(&rcu_bh_state, &__get_cpu_var(rcu_bh_data));
> +	__rcu_process_callbacks(&rcu_sched_state);
> +	__rcu_process_callbacks(&rcu_bh_state);
>  	rcu_preempt_process_callbacks();
>  	trace_rcu_utilization("End RCU core");
>  }
> diff --git a/kernel/rcutree_plugin.h b/kernel/rcutree_plugin.h
> index 6888706..686cb55 100644
> --- a/kernel/rcutree_plugin.h
> +++ b/kernel/rcutree_plugin.h
> @@ -687,8 +687,7 @@ static void rcu_preempt_check_callbacks(int cpu)
>   */
>  static void rcu_preempt_process_callbacks(void)
>  {
> -	__rcu_process_callbacks(&rcu_preempt_state,
> -				&__get_cpu_var(rcu_preempt_data));
> +	__rcu_process_callbacks(&rcu_preempt_state);
>  }
>  
>  #ifdef CONFIG_RCU_BOOST
> -- 
> 1.7.8
> 
--
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