From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Randy Dunlap <rdunlap@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>,
Stephen Rothwell <sfr@canb.auug.org.au>,
linux-next@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: linux-next: Tree for Jan 7 (rcutorture)
Date: Mon, 14 Jan 2013 11:49:56 -0800 [thread overview]
Message-ID: <20130114194956.GB3384@linux.vnet.ibm.com> (raw)
In-Reply-To: <50F45321.50808@infradead.org>
On Mon, Jan 14, 2013 at 10:49:05AM -0800, Randy Dunlap wrote:
> On 01/14/13 09:32, Paul E. McKenney wrote:
> > On Mon, Jan 14, 2013 at 08:45:06AM -0800, Randy Dunlap wrote:
> >> On 01/07/13 19:53, Paul E. McKenney wrote:
> >>> On Mon, Jan 07, 2013 at 07:36:19PM -0500, Steven Rostedt wrote:
> >>>> On Mon, 2013-01-07 at 18:12 -0500, Steven Rostedt wrote:
> >>>>> On Tue, 2013-01-08 at 09:59 +1100, Stephen Rothwell wrote:
> >>>>>> Hi Paul,
> >>>>>>
> >>>>>> On Mon, 7 Jan 2013 14:16:27 -0800 "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> wrote:
> >>>>>>>
> >>>>>>> On Mon, Jan 07, 2013 at 11:42:36AM -0800, Randy Dunlap wrote:
> >>>>>>>>
> >>>>>>>> on i386 or x86_64:
> >>>>>>>>
> >>>>>>>> ERROR: "trace_clock_local" [kernel/rcutorture.ko] undefined!
> >>>>>>>
> >>>>>>> Hello, Randy,
> >>>>>>>
> >>>>>>> Did your build include the following, also pushed to -next in that same
> >>>>>>> batch from -rcu? Including Steven Rostedt on CC for his take.
> >>>>>>
> >>>>>> That commit was certainly in next-20130107.
> >>>>>
> >>>>> Could be bad config dependencies.
> >>>>
> >>>> Paul,
> >>>>
> >>>> You need to also select TRACE_CLOCK if you are going to use it.
> >>>
> >>> Thank you, Steve!
> >>>
> >>> Randy, does the following patch help?
> >>>
> >>> Thanx, Paul
> >>
> >> Hi Paul,
> >>
> >> This patch fixed the Jan. 7 linux-next build errors, but there is
> >> still some similar problem with current linux-next (0114 and late
> >> last week as well).
> >>
> >> ERROR: "trace_clock_local" [kernel/rcutorture.ko] undefined!
> >
> > Ah, my bad...
> >
> > Does the following (rough and untested) patch help?
>
> Yes, it helps, but there is still the same problem in
> rcu_torture_reader() -- after that it builds OK.
One of those days, I guess... Thank you for fixing it up.
Please see below for a more civilized fix.
Thanx, Paul
------------------------------------------------------------------------
diff --git a/kernel/rcu.h b/kernel/rcu.h
index 7f8e759..b5d30c3 100644
--- a/kernel/rcu.h
+++ b/kernel/rcu.h
@@ -24,6 +24,7 @@
#define __LINUX_RCU_H
#ifdef CONFIG_RCU_TRACE
+#include <linux/trace_clock.h>
#define RCU_TRACE(stmt) stmt
#else /* #ifdef CONFIG_RCU_TRACE */
#define RCU_TRACE(stmt)
@@ -118,4 +119,13 @@ int rcu_jiffies_till_stall_check(void);
#endif /* #ifdef CONFIG_RCU_STALL_COMMON */
+static inline u64 notrace rcu_trace_clock_local(void)
+{
+#ifdef CONFIG_RCU_TRACE
+ return trace_clock_local();
+#else /* #ifdef CONFIG_RCU_TRACE */
+ return 0;
+#endif /* #else #ifdef CONFIG_RCU_TRACE */
+}
+
#endif /* __LINUX_RCU_H */
diff --git a/kernel/rcutorture.c b/kernel/rcutorture.c
index cd4c35d..f28f501 100644
--- a/kernel/rcutorture.c
+++ b/kernel/rcutorture.c
@@ -46,8 +46,9 @@
#include <linux/stat.h>
#include <linux/srcu.h>
#include <linux/slab.h>
-#include <linux/trace_clock.h>
#include <asm/byteorder.h>
+#include <trace/events/rcu.h>
+#include "rcu.h"
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Paul E. McKenney <paulmck@us.ibm.com> and Josh Triplett <josh@freedesktop.org>");
@@ -1051,7 +1052,7 @@ static void rcu_torture_timer(unsigned long unused)
idx = cur_ops->readlock();
completed = cur_ops->completed();
- ts = trace_clock_local();
+ ts = rcu_trace_clock_local();
p = rcu_dereference_check(rcu_torture_current,
rcu_read_lock_bh_held() ||
rcu_read_lock_sched_held() ||
@@ -1122,7 +1123,7 @@ rcu_torture_reader(void *arg)
}
idx = cur_ops->readlock();
completed = cur_ops->completed();
- ts = trace_clock_local();
+ ts = rcu_trace_clock_local();
p = rcu_dereference_check(rcu_torture_current,
rcu_read_lock_bh_held() ||
rcu_read_lock_sched_held() ||
next prev parent reply other threads:[~2013-01-14 19:49 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-07 3:26 linux-next: Tree for Jan 7 Stephen Rothwell
2013-01-07 3:26 ` Stephen Rothwell
2013-01-07 19:42 ` linux-next: Tree for Jan 7 (rcutorture) Randy Dunlap
2013-01-07 22:16 ` Paul E. McKenney
2013-01-07 22:59 ` Stephen Rothwell
2013-01-07 23:12 ` Steven Rostedt
2013-01-07 23:24 ` Stephen Rothwell
2013-01-07 23:31 ` Steven Rostedt
2013-01-07 23:47 ` Paul E. McKenney
2013-01-08 0:36 ` Steven Rostedt
2013-01-08 3:53 ` Paul E. McKenney
2013-01-08 6:53 ` Randy Dunlap
2013-01-14 16:45 ` Randy Dunlap
2013-01-14 17:32 ` Paul E. McKenney
2013-01-14 18:49 ` Randy Dunlap
2013-01-14 19:49 ` Paul E. McKenney [this message]
2013-01-15 3:08 ` Steven Rostedt
2013-01-15 4:05 ` Paul E. McKenney
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=20130114194956.GB3384@linux.vnet.ibm.com \
--to=paulmck@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=rdunlap@infradead.org \
--cc=rostedt@goodmis.org \
--cc=sfr@canb.auug.org.au \
/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.