All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] rcu: Make struct rcu_head searchable
@ 2013-11-13 17:02 Steven Rostedt
  2013-11-13 17:12 ` Paul E. McKenney
  0 siblings, 1 reply; 5+ messages in thread
From: Steven Rostedt @ 2013-11-13 17:02 UTC (permalink / raw)
  To: LKML; +Cc: Al Viro, Paul E. McKenney, Andrew Morton

After wasting too much time trying to see where struct rcu_head was
declared, I finally found it in include/linux/types.h as a define for
callback_head!

To prevent other developers from wasting their precious time in
searching for this structure, add a comment to help them find it!

Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Signed-off-by: Steven "frustrated" Rostedt <rostedt@goodmis.org>

diff --git a/include/linux/types.h b/include/linux/types.h
index 4d118ba..073e9a8 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -210,6 +210,9 @@ struct callback_head {
 	struct callback_head *next;
 	void (*func)(struct callback_head *head);
 };
+/*
+ * Make "struct rcu_head {" seachable with this comment.
+ */
 #define rcu_head callback_head
 
 #endif /*  __ASSEMBLY__ */

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] rcu: Make struct rcu_head searchable
  2013-11-13 17:02 [PATCH] rcu: Make struct rcu_head searchable Steven Rostedt
@ 2013-11-13 17:12 ` Paul E. McKenney
  2013-11-13 18:10   ` Steven Rostedt
  0 siblings, 1 reply; 5+ messages in thread
From: Paul E. McKenney @ 2013-11-13 17:12 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: LKML, Al Viro, Andrew Morton

On Wed, Nov 13, 2013 at 12:02:25PM -0500, Steven Rostedt wrote:
> After wasting too much time trying to see where struct rcu_head was
> declared, I finally found it in include/linux/types.h as a define for
> callback_head!
> 
> To prevent other developers from wasting their precious time in
> searching for this structure, add a comment to help them find it!
> 
> Cc: Al Viro <viro@ZenIV.linux.org.uk>
> Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
> Signed-off-by: Steven "frustrated" Rostedt <rostedt@goodmis.org>

The cscope tool is your friend in this case, but nevertheless:

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

> diff --git a/include/linux/types.h b/include/linux/types.h
> index 4d118ba..073e9a8 100644
> --- a/include/linux/types.h
> +++ b/include/linux/types.h
> @@ -210,6 +210,9 @@ struct callback_head {
>  	struct callback_head *next;
>  	void (*func)(struct callback_head *head);
>  };
> +/*
> + * Make "struct rcu_head {" seachable with this comment.
> + */
>  #define rcu_head callback_head
> 
>  #endif /*  __ASSEMBLY__ */
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] rcu: Make struct rcu_head searchable
  2013-11-13 17:12 ` Paul E. McKenney
@ 2013-11-13 18:10   ` Steven Rostedt
  2013-11-13 18:57     ` Andrew Morton
  0 siblings, 1 reply; 5+ messages in thread
From: Steven Rostedt @ 2013-11-13 18:10 UTC (permalink / raw)
  To: paulmck; +Cc: LKML, Al Viro, Andrew Morton

On Wed, 13 Nov 2013 09:12:05 -0800
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com> wrote:

> On Wed, Nov 13, 2013 at 12:02:25PM -0500, Steven Rostedt wrote:
> > After wasting too much time trying to see where struct rcu_head was
> > declared, I finally found it in include/linux/types.h as a define for
> > callback_head!
> > 
> > To prevent other developers from wasting their precious time in
> > searching for this structure, add a comment to help them find it!
> > 
> > Cc: Al Viro <viro@ZenIV.linux.org.uk>
> > Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
> > Signed-off-by: Steven "frustrated" Rostedt <rostedt@goodmis.org>
> 
> The cscope tool is your friend in this case, but nevertheless:

I use emacs, and the latest version of etags (or emacs) brings you to
each use case before it gets you to the define (which is really
annoying). Back in 2006 it use to work properly. I need to figure out
what changed :-/


> 
> Reviewed-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
> 
> > diff --git a/include/linux/types.h b/include/linux/types.h
> > index 4d118ba..073e9a8 100644
> > --- a/include/linux/types.h
> > +++ b/include/linux/types.h
> > @@ -210,6 +210,9 @@ struct callback_head {
> >  	struct callback_head *next;
> >  	void (*func)(struct callback_head *head);
> >  };
> > +/*
> > + * Make "struct rcu_head {" seachable with this comment.

I've been told s/seachable/searchable/

Frustration fails me ;-)

-- Steve

> > + */
> >  #define rcu_head callback_head
> > 
> >  #endif /*  __ASSEMBLY__ */
> > 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] rcu: Make struct rcu_head searchable
  2013-11-13 18:10   ` Steven Rostedt
@ 2013-11-13 18:57     ` Andrew Morton
  2013-11-13 19:05       ` Steven Rostedt
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew Morton @ 2013-11-13 18:57 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: paulmck, LKML, Al Viro

On Wed, 13 Nov 2013 13:10:44 -0500 Steven Rostedt <rostedt@goodmis.org> wrote:

> On Wed, 13 Nov 2013 09:12:05 -0800
> "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> wrote:
> 
> > On Wed, Nov 13, 2013 at 12:02:25PM -0500, Steven Rostedt wrote:
> > > After wasting too much time trying to see where struct rcu_head was
> > > declared, I finally found it in include/linux/types.h as a define for
> > > callback_head!
> > > 
> > > To prevent other developers from wasting their precious time in
> > > searching for this structure, add a comment to help them find it!
> > > 
> > > Cc: Al Viro <viro@ZenIV.linux.org.uk>
> > > Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
> > > Signed-off-by: Steven "frustrated" Rostedt <rostedt@goodmis.org>
> > 
> > The cscope tool is your friend in this case, but nevertheless:
> 
> I use emacs, and the latest version of etags (or emacs) brings you to
> each use case before it gets you to the define (which is really
> annoying). Back in 2006 it use to work properly. I need to figure out
> what changed :-/

That irritates me too.  Fortunately I just invented

(grep "#define" tags && grep -v "#define" tags) > tags.new

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] rcu: Make struct rcu_head searchable
  2013-11-13 18:57     ` Andrew Morton
@ 2013-11-13 19:05       ` Steven Rostedt
  0 siblings, 0 replies; 5+ messages in thread
From: Steven Rostedt @ 2013-11-13 19:05 UTC (permalink / raw)
  To: Andrew Morton; +Cc: paulmck, LKML, Al Viro

On Wed, 13 Nov 2013 10:57:05 -0800
Andrew Morton <akpm@linux-foundation.org> wrote:


> That irritates me too.  Fortunately I just invented
> 
> (grep "#define" tags && grep -v "#define" tags) > tags.new

Unfortunately, TAGS doesn't work that way. Hmm, I could whip up a perl
script to do it for me though.

-- Steve

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-11-13 19:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-13 17:02 [PATCH] rcu: Make struct rcu_head searchable Steven Rostedt
2013-11-13 17:12 ` Paul E. McKenney
2013-11-13 18:10   ` Steven Rostedt
2013-11-13 18:57     ` Andrew Morton
2013-11-13 19:05       ` Steven Rostedt

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.