All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Tejun Heo <tj@kernel.org>
Cc: Lai Jiangshan <laijs@cn.fujitsu.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@elte.hu>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] rcu: simplify the usage of percpu data
Date: Mon, 28 Jun 2010 12:57:47 -0700	[thread overview]
Message-ID: <20100628195747.GA30400@linux.vnet.ibm.com> (raw)
In-Reply-To: <20100628165654.GA2357@linux.vnet.ibm.com>

On Mon, Jun 28, 2010 at 09:56:54AM -0700, Paul E. McKenney wrote:
> On Mon, Jun 28, 2010 at 10:38:39AM +0200, Tejun Heo wrote:
> > On 06/28/2010 10:25 AM, Lai Jiangshan wrote:
> > > &percpu_data is compatible with allocated percpu data.
> > > 
> > > And we use it and remove the "rda[NR_CPUS]" array.
> > > 
> > > Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
> > 
> > Looks good to me.
> > 
> > Reviewed-by: Tejun Heo <tj@kernel.org>
> 
> Thank you both!!!  I have queued this.

FYI, I added the patchlet below to make it build for CONFIG_RCU_TRACE
kernels.

							Thanx, Paul

------------------------------------------------------------------------

rcu: apply ->rda changes to rcutree_trace.c
    
The print_rcu_pendings() function used the ->rda[] array, so this
commit makes it instead use per_cpu_ptr().

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>

diff --git a/kernel/rcutree_trace.c b/kernel/rcutree_trace.c
index 36c95b4..458e032 100644
--- a/kernel/rcutree_trace.c
+++ b/kernel/rcutree_trace.c
@@ -262,7 +262,7 @@ static void print_rcu_pendings(struct seq_file *m, struct rcu_state *rsp)
 	struct rcu_data *rdp;
 
 	for_each_possible_cpu(cpu) {
-		rdp = rsp->rda[cpu];
+		rdp = per_cpu_ptr(rsp->rda, cpu);
 		if (rdp->beenonline)
 			print_one_rcu_pending(m, rdp);
 	}

      reply	other threads:[~2010-06-28 19:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-28  8:25 [PATCH] rcu: simplify the usage of percpu data Lai Jiangshan
2010-06-28  8:38 ` Tejun Heo
2010-06-28 16:56   ` Paul E. McKenney
2010-06-28 19:57     ` Paul E. McKenney [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100628195747.GA30400@linux.vnet.ibm.com \
    --to=paulmck@linux.vnet.ibm.com \
    --cc=laijs@cn.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.