public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: linux-kernel@vger.kernel.org
Cc: mingo@elte.hu, rostedt@goodmis.org, akpm@linux-foundation.org,
	ego@in.ibm.com, dvhltc@us.ibm.com, niv@us.ibm.com
Subject: [PATCH -tip/core/rcu] fixes to include/linux/rcupreempt.h
Date: Fri, 1 Aug 2008 14:10:02 -0700	[thread overview]
Message-ID: <20080801211002.GM14851@linux.vnet.ibm.com> (raw)

Hello!

Compared tip/core/rcu to my latest patchset, and found the following
issues:

o	the memory barrier in rcu_exit_nohz() somehow got out of place
	(it is correct in mainline as of 2.6.26-rc7).

o	There is a duplicate declaration of rcu_dyntick_sched.

The attached patch fixes these.

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

diff --git a/include/linux/rcupreempt.h b/include/linux/rcupreempt.h
index f04b64e..84678bf 100644
--- a/include/linux/rcupreempt.h
+++ b/include/linux/rcupreempt.h
@@ -111,7 +111,6 @@ extern struct rcupreempt_trace *rcupreempt_trace_cpu(int cpu);
 struct softirq_action;
 
 #ifdef CONFIG_NO_HZ
-DECLARE_PER_CPU(struct rcu_dyntick_sched, rcu_dyntick_sched);
 
 static inline void rcu_enter_nohz(void)
 {
@@ -122,8 +121,8 @@ static inline void rcu_enter_nohz(void)
 
 static inline void rcu_exit_nohz(void)
 {
-	smp_mb(); /* CPUs seeing ++ must see later RCU read-side crit sects */
 	__get_cpu_var(rcu_dyntick_sched).dynticks++;
+	smp_mb(); /* CPUs seeing ++ must see later RCU read-side crit sects */
 	WARN_ON(!(__get_cpu_var(rcu_dyntick_sched).dynticks & 0x1));
 }
 

             reply	other threads:[~2008-08-01 21:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-01 21:10 Paul E. McKenney [this message]
2008-08-15 15:02 ` [PATCH -tip/core/rcu] fixes to include/linux/rcupreempt.h Ingo Molnar
2008-08-20 16:16 ` Steven Rostedt
2008-08-20 22:33   ` Paul E. McKenney
2008-08-21  1:01     ` Steven Rostedt

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=20080801211002.GM14851@linux.vnet.ibm.com \
    --to=paulmck@linux.vnet.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=dvhltc@us.ibm.com \
    --cc=ego@in.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=niv@us.ibm.com \
    --cc=rostedt@goodmis.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox