* rcu: Replace __this_cpu_ptr uses with raw_cpu_ptr
@ 2014-04-15 17:35 Christoph Lameter
2014-04-15 19:21 ` Paul E. McKenney
0 siblings, 1 reply; 2+ messages in thread
From: Christoph Lameter @ 2014-04-15 17:35 UTC (permalink / raw)
To: Paul E. McKenney; +Cc: linux-kernel
3.15-rc1 has raw_cpu operations. So this patch that you acked before will
now apply.
Subject: rcu: Replace __this_cpu_ptr uses with raw_cpu_ptr
__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@in.ibm.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Christoph Lameter <cl@linux.com>
Index: linux/kernel/rcu/tree.c
===================================================================
--- linux.orig/kernel/rcu/tree.c 2014-04-14 13:24:55.189353922 -0500
+++ linux/kernel/rcu/tree.c 2014-04-14 13:24:55.185354000 -0500
@@ -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);
@@ -2988,7 +2988,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-04-14 13:24:55.189353922 -0500
+++ linux/kernel/rcu/tree_plugin.h 2014-04-14 13:24:55.185354000 -0500
@@ -1855,7 +1855,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);
@@ -1997,7 +1997,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 */
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: rcu: Replace __this_cpu_ptr uses with raw_cpu_ptr
2014-04-15 17:35 rcu: Replace __this_cpu_ptr uses with raw_cpu_ptr Christoph Lameter
@ 2014-04-15 19:21 ` Paul E. McKenney
0 siblings, 0 replies; 2+ messages in thread
From: Paul E. McKenney @ 2014-04-15 19:21 UTC (permalink / raw)
To: Christoph Lameter; +Cc: linux-kernel
On Tue, Apr 15, 2014 at 12:35:13PM -0500, Christoph Lameter wrote:
> 3.15-rc1 has raw_cpu operations. So this patch that you acked before will
> now apply.
>
>
> Subject: rcu: Replace __this_cpu_ptr uses with raw_cpu_ptr
>
> __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@in.ibm.com>
> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
> Signed-off-by: Christoph Lameter <cl@linux.com>
Queued for 3.16, thank you Christoph.
Thanx, Paul
> Index: linux/kernel/rcu/tree.c
> ===================================================================
> --- linux.orig/kernel/rcu/tree.c 2014-04-14 13:24:55.189353922 -0500
> +++ linux/kernel/rcu/tree.c 2014-04-14 13:24:55.185354000 -0500
> @@ -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);
>
> @@ -2988,7 +2988,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-04-14 13:24:55.189353922 -0500
> +++ linux/kernel/rcu/tree_plugin.h 2014-04-14 13:24:55.185354000 -0500
> @@ -1855,7 +1855,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);
> @@ -1997,7 +1997,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 */
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-04-15 19:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-15 17:35 rcu: Replace __this_cpu_ptr uses with raw_cpu_ptr Christoph Lameter
2014-04-15 19:21 ` Paul E. McKenney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox