public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tracing, rcu: Remove no longer used trace event rcu_prep_idle
@ 2017-10-12 22:12 Steven Rostedt
  2017-10-12 22:26 ` Paul E. McKenney
  0 siblings, 1 reply; 4+ messages in thread
From: Steven Rostedt @ 2017-10-12 22:12 UTC (permalink / raw)
  To: LKML; +Cc: Paul E. McKenney, Andrew Morton

From: Steven Rostedt (VMware) <rostedt@goodmis.org>

Commit c0f4dfd4f90 ("rcu: Make RCU_FAST_NO_HZ take advantage of
numbered callbacks") removed the only instances of trace_rcu_prep_idle,
but did not remove the TRACE_EVENT() that creates it. As defined trace
events take up memory within the kernel even when they are not used,
this is a waste of space. Remove the obsolete event.

Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
Index: linux-trace.git/include/trace/events/rcu.h
===================================================================
--- linux-trace.git.orig/include/trace/events/rcu.h
+++ linux-trace.git/include/trace/events/rcu.h
@@ -454,45 +454,6 @@ TRACE_EVENT(rcu_dyntick,
 );
 
 /*
- * Tracepoint for RCU preparation for idle, the goal being to get RCU
- * processing done so that the current CPU can shut off its scheduling
- * clock and enter dyntick-idle mode.  One way to accomplish this is
- * to drain all RCU callbacks from this CPU, and the other is to have
- * done everything RCU requires for the current grace period.  In this
- * latter case, the CPU will be awakened at the end of the current grace
- * period in order to process the remainder of its callbacks.
- *
- * These tracepoints take a string as argument:
- *
- *	"No callbacks": Nothing to do, no callbacks on this CPU.
- *	"In holdoff": Nothing to do, holding off after unsuccessful attempt.
- *	"Begin holdoff": Attempt failed, don't retry until next jiffy.
- *	"Dyntick with callbacks": Entering dyntick-idle despite callbacks.
- *	"Dyntick with lazy callbacks": Entering dyntick-idle w/lazy callbacks.
- *	"More callbacks": Still more callbacks, try again to clear them out.
- *	"Callbacks drained": All callbacks processed, off to dyntick idle!
- *	"Timer": Timer fired to cause CPU to continue processing callbacks.
- *	"Demigrate": Timer fired on wrong CPU, woke up correct CPU.
- *	"Cleanup after idle": Idle exited, timer canceled.
- */
-TRACE_EVENT(rcu_prep_idle,
-
-	TP_PROTO(const char *reason),
-
-	TP_ARGS(reason),
-
-	TP_STRUCT__entry(
-		__field(const char *, reason)
-	),
-
-	TP_fast_assign(
-		__entry->reason = reason;
-	),
-
-	TP_printk("%s", __entry->reason)
-);
-
-/*
  * Tracepoint for the registration of a single RCU callback function.
  * The first argument is the type of RCU, the second argument is
  * a pointer to the RCU callback itself, the third element is the
@@ -799,7 +760,6 @@ TRACE_EVENT(rcu_barrier,
 	while (0)
 #define trace_rcu_fqs(rcuname, gpnum, cpu, qsevent) do { } while (0)
 #define trace_rcu_dyntick(polarity, oldnesting, newnesting) do { } while (0)
-#define trace_rcu_prep_idle(reason) do { } while (0)
 #define trace_rcu_callback(rcuname, rhp, qlen_lazy, qlen) do { } while (0)
 #define trace_rcu_kfree_callback(rcuname, rhp, offset, qlen_lazy, qlen) \
 	do { } while (0)

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

* Re: [PATCH] tracing, rcu: Remove no longer used trace event rcu_prep_idle
  2017-10-12 22:12 [PATCH] tracing, rcu: Remove no longer used trace event rcu_prep_idle Steven Rostedt
@ 2017-10-12 22:26 ` Paul E. McKenney
  2017-10-12 22:32   ` Steven Rostedt
  0 siblings, 1 reply; 4+ messages in thread
From: Paul E. McKenney @ 2017-10-12 22:26 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: LKML, Andrew Morton

On Thu, Oct 12, 2017 at 06:12:57PM -0400, Steven Rostedt wrote:
> From: Steven Rostedt (VMware) <rostedt@goodmis.org>
> 
> Commit c0f4dfd4f90 ("rcu: Make RCU_FAST_NO_HZ take advantage of
> numbered callbacks") removed the only instances of trace_rcu_prep_idle,
> but did not remove the TRACE_EVENT() that creates it. As defined trace
> events take up memory within the kernel even when they are not used,
> this is a waste of space. Remove the obsolete event.
> 
> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>

Good catch, queued for review and testing, thank you!

Slight change in the context of the final hunk of the patch for -rcu,
updated version shown below.

							Thanx, Paul

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

commit f9e1984a4a646537bc1c7bb1b86c57eb4906c468
Author: Steven Rostedt (VMware) <rostedt@goodmis.org>
Date:   Thu Oct 12 18:12:57 2017 -0400

    tracing, rcu: Remove no longer used trace event rcu_prep_idle
    
    Commit c0f4dfd4f90 ("rcu: Make RCU_FAST_NO_HZ take advantage of
    numbered callbacks") removed the only instances of trace_rcu_prep_idle,
    but did not remove the TRACE_EVENT() that creates it. As defined trace
    events take up memory within the kernel even when they are not used,
    this is a waste of space. Remove the obsolete event.
    
    Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
    Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>

diff --git a/include/trace/events/rcu.h b/include/trace/events/rcu.h
index 38069bbcc859..fe06b639f973 100644
--- a/include/trace/events/rcu.h
+++ b/include/trace/events/rcu.h
@@ -457,45 +457,6 @@ TRACE_EVENT(rcu_dyntick,
 );
 
 /*
- * Tracepoint for RCU preparation for idle, the goal being to get RCU
- * processing done so that the current CPU can shut off its scheduling
- * clock and enter dyntick-idle mode.  One way to accomplish this is
- * to drain all RCU callbacks from this CPU, and the other is to have
- * done everything RCU requires for the current grace period.  In this
- * latter case, the CPU will be awakened at the end of the current grace
- * period in order to process the remainder of its callbacks.
- *
- * These tracepoints take a string as argument:
- *
- *	"No callbacks": Nothing to do, no callbacks on this CPU.
- *	"In holdoff": Nothing to do, holding off after unsuccessful attempt.
- *	"Begin holdoff": Attempt failed, don't retry until next jiffy.
- *	"Dyntick with callbacks": Entering dyntick-idle despite callbacks.
- *	"Dyntick with lazy callbacks": Entering dyntick-idle w/lazy callbacks.
- *	"More callbacks": Still more callbacks, try again to clear them out.
- *	"Callbacks drained": All callbacks processed, off to dyntick idle!
- *	"Timer": Timer fired to cause CPU to continue processing callbacks.
- *	"Demigrate": Timer fired on wrong CPU, woke up correct CPU.
- *	"Cleanup after idle": Idle exited, timer canceled.
- */
-TRACE_EVENT(rcu_prep_idle,
-
-	TP_PROTO(const char *reason),
-
-	TP_ARGS(reason),
-
-	TP_STRUCT__entry(
-		__field(const char *, reason)
-	),
-
-	TP_fast_assign(
-		__entry->reason = reason;
-	),
-
-	TP_printk("%s", __entry->reason)
-);
-
-/*
  * Tracepoint for the registration of a single RCU callback function.
  * The first argument is the type of RCU, the second argument is
  * a pointer to the RCU callback itself, the third element is the
@@ -802,7 +763,6 @@ TRACE_EVENT(rcu_barrier,
 	while (0)
 #define trace_rcu_fqs(rcuname, gpnum, cpu, qsevent) do { } while (0)
 #define trace_rcu_dyntick(polarity, oldnesting, newnesting, dyntick) do { } while (0)
-#define trace_rcu_prep_idle(reason) do { } while (0)
 #define trace_rcu_callback(rcuname, rhp, qlen_lazy, qlen) do { } while (0)
 #define trace_rcu_kfree_callback(rcuname, rhp, offset, qlen_lazy, qlen) \
 	do { } while (0)

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

* Re: [PATCH] tracing, rcu: Remove no longer used trace event rcu_prep_idle
  2017-10-12 22:26 ` Paul E. McKenney
@ 2017-10-12 22:32   ` Steven Rostedt
  2017-10-12 22:46     ` Paul E. McKenney
  0 siblings, 1 reply; 4+ messages in thread
From: Steven Rostedt @ 2017-10-12 22:32 UTC (permalink / raw)
  To: Paul E. McKenney; +Cc: LKML, Andrew Morton

On Thu, 12 Oct 2017 15:26:45 -0700
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com> wrote:

> On Thu, Oct 12, 2017 at 06:12:57PM -0400, Steven Rostedt wrote:
> > From: Steven Rostedt (VMware) <rostedt@goodmis.org>
> > 
> > Commit c0f4dfd4f90 ("rcu: Make RCU_FAST_NO_HZ take advantage of
> > numbered callbacks") removed the only instances of trace_rcu_prep_idle,
> > but did not remove the TRACE_EVENT() that creates it. As defined trace
> > events take up memory within the kernel even when they are not used,
> > this is a waste of space. Remove the obsolete event.
> > 
> > Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>  
> 
> Good catch, queued for review and testing, thank you!
> 
> Slight change in the context of the final hunk of the patch for -rcu,
> updated version shown below.

I now have a utility that complains when tracepoints are not used. But
I'm working on getting this to work at build time and not run time. In
the mean time, I might as well do some clean up ;-)

-- Steve

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

* Re: [PATCH] tracing, rcu: Remove no longer used trace event rcu_prep_idle
  2017-10-12 22:32   ` Steven Rostedt
@ 2017-10-12 22:46     ` Paul E. McKenney
  0 siblings, 0 replies; 4+ messages in thread
From: Paul E. McKenney @ 2017-10-12 22:46 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: LKML, Andrew Morton

On Thu, Oct 12, 2017 at 06:32:39PM -0400, Steven Rostedt wrote:
> On Thu, 12 Oct 2017 15:26:45 -0700
> "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> wrote:
> 
> > On Thu, Oct 12, 2017 at 06:12:57PM -0400, Steven Rostedt wrote:
> > > From: Steven Rostedt (VMware) <rostedt@goodmis.org>
> > > 
> > > Commit c0f4dfd4f90 ("rcu: Make RCU_FAST_NO_HZ take advantage of
> > > numbered callbacks") removed the only instances of trace_rcu_prep_idle,
> > > but did not remove the TRACE_EVENT() that creates it. As defined trace
> > > events take up memory within the kernel even when they are not used,
> > > this is a waste of space. Remove the obsolete event.
> > > 
> > > Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>  
> > 
> > Good catch, queued for review and testing, thank you!
> > 
> > Slight change in the context of the final hunk of the patch for -rcu,
> > updated version shown below.
> 
> I now have a utility that complains when tracepoints are not used. But
> I'm working on getting this to work at build time and not run time. In
> the mean time, I might as well do some clean up ;-)

Well, I just today learned that I am not supposed to be using the %p
printk format option, so been doing a bit of cleaning here as well.  ;-)

							Thanx, Paul

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

end of thread, other threads:[~2017-10-12 22:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-12 22:12 [PATCH] tracing, rcu: Remove no longer used trace event rcu_prep_idle Steven Rostedt
2017-10-12 22:26 ` Paul E. McKenney
2017-10-12 22:32   ` Steven Rostedt
2017-10-12 22:46     ` Paul E. McKenney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox