Re: [PATCH v9 4/7] tracepoint: Make rcuidle tracepoint callers use SRCU

2018-07-12 Thread Steven Rostedt
On Thu, 12 Jul 2018 13:29:32 -0700 Joel Fernandes wrote: > Also the kselftest patches were acked and can be taken independently, > I had reposted them as a separate 2 patch series with some minor > changes based on your suggestions. Could you check them? > Yep, I saw them. I was going to wait ti

Re: [PATCH v9 4/7] tracepoint: Make rcuidle tracepoint callers use SRCU

2018-07-12 Thread Joel Fernandes
On Thu, Jul 12, 2018 at 1:15 PM, Steven Rostedt wrote: > On Thu, 12 Jul 2018 12:17:01 -0700 >> So then, we should use the regular variant for this additional check you're >> suggesting. > > OK, I thought we had a rcu_dereference_notrace() that did checks and > thought that this followed suit, but

Re: [PATCH v9 4/7] tracepoint: Make rcuidle tracepoint callers use SRCU

2018-07-12 Thread Steven Rostedt
On Thu, 12 Jul 2018 12:17:01 -0700 Joel Fernandes wrote: > AFAICT, _notrace doesn't call into lockdep or tracing (there's also a comment > that says so): > > /** > * srcu_dereference_notrace - no tracing and no lockdep calls from here > */ Note, I had a different tree checked out, so I didn't

Re: [PATCH v9 4/7] tracepoint: Make rcuidle tracepoint callers use SRCU

2018-07-12 Thread Joel Fernandes
On Thu, Jul 12, 2018 at 09:35:12AM -0400, Steven Rostedt wrote: > On Wed, 11 Jul 2018 21:28:25 -0700 > Joel Fernandes wrote: > > > On Wed, Jul 11, 2018 at 11:21:20PM -0400, Steven Rostedt wrote: > > > On Wed, 11 Jul 2018 13:52:49 -0700 > > > Joel Fernandes wrote: > > > > > > > > #define __DE

Re: [PATCH v9 4/7] tracepoint: Make rcuidle tracepoint callers use SRCU

2018-07-12 Thread Steven Rostedt
On Wed, 11 Jul 2018 21:28:25 -0700 Joel Fernandes wrote: > On Wed, Jul 11, 2018 at 11:21:20PM -0400, Steven Rostedt wrote: > > On Wed, 11 Jul 2018 13:52:49 -0700 > > Joel Fernandes wrote: > > > > > > #define __DECLARE_TRACE(name, proto, args, cond, data_proto, data_args) > > > > \ > > > >

Re: [PATCH v9 4/7] tracepoint: Make rcuidle tracepoint callers use SRCU

2018-07-11 Thread Joel Fernandes
On Wed, Jul 11, 2018 at 11:21:20PM -0400, Steven Rostedt wrote: > On Wed, 11 Jul 2018 13:52:49 -0700 > Joel Fernandes wrote: > > > > #define __DECLARE_TRACE(name, proto, args, cond, data_proto, data_args) \ > > > extern struct tracepoint __tracepoint_##name; \ > > > static i

Re: [PATCH v9 4/7] tracepoint: Make rcuidle tracepoint callers use SRCU

2018-07-11 Thread Steven Rostedt
On Wed, 11 Jul 2018 13:52:49 -0700 Joel Fernandes wrote: > > #define __DECLARE_TRACE(name, proto, args, cond, data_proto, data_args) \ > > extern struct tracepoint __tracepoint_##name; \ > > static inline void trace_##name(proto) \ > > {

Re: [PATCH v9 4/7] tracepoint: Make rcuidle tracepoint callers use SRCU

2018-07-11 Thread Joel Fernandes
On Wed, Jul 11, 2018 at 09:22:37PM -0400, Steven Rostedt wrote: > On Wed, 11 Jul 2018 13:56:39 -0700 > Joel Fernandes wrote: > > > > > #define __DECLARE_TRACE(name, proto, args, cond, data_proto, data_args) > > > > \ > > > > extern struct tracepoint __tracepoint_##name;

Re: [PATCH v9 4/7] tracepoint: Make rcuidle tracepoint callers use SRCU

2018-07-11 Thread Joel Fernandes
On Wed, Jul 11, 2018 at 02:53:22PM +0200, Peter Zijlstra wrote: > On Thu, Jun 28, 2018 at 11:21:46AM -0700, Joel Fernandes wrote: > > - rcu_read_lock_sched_notrace(); \ > > - it_func_ptr = rcu_dereference_sched((tp)->funcs); \ > > +

Re: [PATCH v9 4/7] tracepoint: Make rcuidle tracepoint callers use SRCU

2018-07-11 Thread Steven Rostedt
On Wed, 11 Jul 2018 17:31:00 -0700 Joel Fernandes wrote: > On Wed, Jul 11, 2018 at 09:06:49AM -0400, Steven Rostedt wrote: > > On Wed, 11 Jul 2018 14:56:47 +0200 > > Peter Zijlstra wrote: > > > > > On Thu, Jun 28, 2018 at 11:21:46AM -0700, Joel Fernandes wrote: > > > > static inline void t

Re: [PATCH v9 4/7] tracepoint: Make rcuidle tracepoint callers use SRCU

2018-07-11 Thread Steven Rostedt
On Wed, 11 Jul 2018 13:56:39 -0700 Joel Fernandes wrote: > > > #define __DECLARE_TRACE(name, proto, args, cond, data_proto, data_args) \ > > > extern struct tracepoint __tracepoint_##name; \ > > > static inline void trace_##name(proto) \ > > > {

Re: [PATCH v9 4/7] tracepoint: Make rcuidle tracepoint callers use SRCU

2018-07-11 Thread Joel Fernandes
On Wed, Jul 11, 2018 at 09:06:49AM -0400, Steven Rostedt wrote: > On Wed, 11 Jul 2018 14:56:47 +0200 > Peter Zijlstra wrote: > > > On Thu, Jun 28, 2018 at 11:21:46AM -0700, Joel Fernandes wrote: > > > static inline void tracepoint_synchronize_unregister(void) > > > { > > > + synchronize_srcu(&t

Re: [PATCH v9 4/7] tracepoint: Make rcuidle tracepoint callers use SRCU

2018-07-11 Thread Joel Fernandes
On Wed, Jul 11, 2018 at 08:15:59AM -0700, Paul E. McKenney wrote: > On Wed, Jul 11, 2018 at 10:46:18AM -0400, Steven Rostedt wrote: > > On Wed, 11 Jul 2018 07:27:44 -0700 > > "Paul E. McKenney" wrote: > > > > > On Wed, Jul 11, 2018 at 09:00:03AM -0400, Steven Rostedt wrote: > > > > On Wed, 11 Jul

Re: [PATCH v9 4/7] tracepoint: Make rcuidle tracepoint callers use SRCU

2018-07-11 Thread Joel Fernandes
On Wed, Jul 11, 2018 at 10:46:18AM -0400, Steven Rostedt wrote: > On Wed, 11 Jul 2018 07:27:44 -0700 > "Paul E. McKenney" wrote: > > > On Wed, Jul 11, 2018 at 09:00:03AM -0400, Steven Rostedt wrote: > > > On Wed, 11 Jul 2018 14:49:54 +0200 > > > Peter Zijlstra wrote: > > > > > > > On Thu, Jun

Re: [PATCH v9 4/7] tracepoint: Make rcuidle tracepoint callers use SRCU

2018-07-11 Thread Mathieu Desnoyers
- On Jul 11, 2018, at 11:26 AM, rostedt rost...@goodmis.org wrote: > On Wed, 11 Jul 2018 17:17:51 +0200 > Peter Zijlstra wrote: > >> I just read the comment that goes with that function; the order doesn't >> matter. All we want to ensure is that the unregistration is visible to >> either sch

Re: [PATCH v9 4/7] tracepoint: Make rcuidle tracepoint callers use SRCU

2018-07-11 Thread Mathieu Desnoyers
- On Jul 11, 2018, at 11:17 AM, Peter Zijlstra pet...@infradead.org wrote: > On Wed, Jul 11, 2018 at 09:06:49AM -0400, Steven Rostedt wrote: >> On Wed, 11 Jul 2018 14:56:47 +0200 >> Peter Zijlstra wrote: >> >> > On Thu, Jun 28, 2018 at 11:21:46AM -0700, Joel Fernandes wrote: >> > > static i

Re: [PATCH v9 4/7] tracepoint: Make rcuidle tracepoint callers use SRCU

2018-07-11 Thread Steven Rostedt
On Wed, 11 Jul 2018 17:17:51 +0200 Peter Zijlstra wrote: > I just read the comment that goes with that function; the order doesn't > matter. All we want to ensure is that the unregistration is visible to > either sched or srcu tracepoint users. Yeah, but I think it is still good to change the or

Re: [PATCH v9 4/7] tracepoint: Make rcuidle tracepoint callers use SRCU

2018-07-11 Thread Peter Zijlstra
On Wed, Jul 11, 2018 at 09:06:49AM -0400, Steven Rostedt wrote: > On Wed, 11 Jul 2018 14:56:47 +0200 > Peter Zijlstra wrote: > > > On Thu, Jun 28, 2018 at 11:21:46AM -0700, Joel Fernandes wrote: > > > static inline void tracepoint_synchronize_unregister(void) > > > { > > > + synchronize_srcu(&t

Re: [PATCH v9 4/7] tracepoint: Make rcuidle tracepoint callers use SRCU

2018-07-11 Thread Paul E. McKenney
On Wed, Jul 11, 2018 at 10:46:18AM -0400, Steven Rostedt wrote: > On Wed, 11 Jul 2018 07:27:44 -0700 > "Paul E. McKenney" wrote: > > > On Wed, Jul 11, 2018 at 09:00:03AM -0400, Steven Rostedt wrote: > > > On Wed, 11 Jul 2018 14:49:54 +0200 > > > Peter Zijlstra wrote: > > > > > > > On Thu, Jun

Re: [PATCH v9 4/7] tracepoint: Make rcuidle tracepoint callers use SRCU

2018-07-11 Thread Steven Rostedt
On Wed, 11 Jul 2018 07:27:44 -0700 "Paul E. McKenney" wrote: > On Wed, Jul 11, 2018 at 09:00:03AM -0400, Steven Rostedt wrote: > > On Wed, 11 Jul 2018 14:49:54 +0200 > > Peter Zijlstra wrote: > > > > > On Thu, Jun 28, 2018 at 11:21:46AM -0700, Joel Fernandes wrote: > > > > - i

Re: [PATCH v9 4/7] tracepoint: Make rcuidle tracepoint callers use SRCU

2018-07-11 Thread Paul E. McKenney
On Wed, Jul 11, 2018 at 09:00:03AM -0400, Steven Rostedt wrote: > On Wed, 11 Jul 2018 14:49:54 +0200 > Peter Zijlstra wrote: > > > On Thu, Jun 28, 2018 at 11:21:46AM -0700, Joel Fernandes wrote: > > > - it_func_ptr = rcu_dereference_sched((tp)->funcs); \ > > > > I would convert t

Re: [PATCH v9 4/7] tracepoint: Make rcuidle tracepoint callers use SRCU

2018-07-11 Thread Steven Rostedt
On Wed, 11 Jul 2018 14:56:47 +0200 Peter Zijlstra wrote: > On Thu, Jun 28, 2018 at 11:21:46AM -0700, Joel Fernandes wrote: > > static inline void tracepoint_synchronize_unregister(void) > > { > > + synchronize_srcu(&tracepoint_srcu); > > synchronize_sched(); > > } > > Given you below

Re: [PATCH v9 4/7] tracepoint: Make rcuidle tracepoint callers use SRCU

2018-07-11 Thread Steven Rostedt
On Wed, 11 Jul 2018 14:49:54 +0200 Peter Zijlstra wrote: > On Thu, Jun 28, 2018 at 11:21:46AM -0700, Joel Fernandes wrote: > > - it_func_ptr = rcu_dereference_sched((tp)->funcs); \ > > I would convert to rcu_dereference_raw() to appease sparse. The fancy > stuff below is pointl

Re: [PATCH v9 4/7] tracepoint: Make rcuidle tracepoint callers use SRCU

2018-07-11 Thread Peter Zijlstra
On Thu, Jun 28, 2018 at 11:21:46AM -0700, Joel Fernandes wrote: > static inline void tracepoint_synchronize_unregister(void) > { > + synchronize_srcu(&tracepoint_srcu); > synchronize_sched(); > } Given you below do call_rcu_sched() and then call_srcu(), isn't the above the wrong way a

Re: [PATCH v9 4/7] tracepoint: Make rcuidle tracepoint callers use SRCU

2018-07-11 Thread Peter Zijlstra
On Thu, Jun 28, 2018 at 11:21:46AM -0700, Joel Fernandes wrote: > - rcu_read_lock_sched_notrace(); \ > - it_func_ptr = rcu_dereference_sched((tp)->funcs); \ > + \ > +

Re: [PATCH v9 4/7] tracepoint: Make rcuidle tracepoint callers use SRCU

2018-07-11 Thread Peter Zijlstra
On Thu, Jun 28, 2018 at 11:21:46AM -0700, Joel Fernandes wrote: > - it_func_ptr = rcu_dereference_sched((tp)->funcs); \ I would convert to rcu_dereference_raw() to appease sparse. The fancy stuff below is pointless if you then turn off all checking. > +