Skip to contentSkip to conversation

rcu: tree: Remove unused externs

RFC PATCH In review Joel Fernandes (Google) 2 participants 6 messages Sep 22, 2018 – Sep 23, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/3 rcu: tree: Remove unused externs

These aren't used anymore. Remove them.

---
 kernel/rcu/tree.h | 11 -----------
 1 file changed, 11 deletions(-)
kernel/rcu/tree.h +0 -11
index 703e19ff532d..57a937ac51c2 100644
@@ -398,17 +398,6 @@ static const char *tp_rcu_varname __used __tracepoint_string = rcu_name;
 #define RCU_NAME rcu_name
 #endif /* #else #ifdef CONFIG_TRACING */
 
-/*
- * RCU implementation internal declarations:
- */
-extern struct rcu_state rcu_sched_state;
-
-extern struct rcu_state rcu_bh_state;
-
-#ifdef CONFIG_PREEMPT_RCU
-extern struct rcu_state rcu_preempt_state;
-#endif /* #ifdef CONFIG_PREEMPT_RCU */
-
 int rcu_dynticks_snap(struct rcu_data *rdp);
 
 #ifdef CONFIG_RCU_BOOST
Signature · 1 line
2.19.0.444.g18242da7ef-goog
#1 lore raw

RFC PATCH 2/3 rcu: tree: Fix comment about gp_seq_needed

rcu_state does not have a gp_seq_needed field. This comment therefore is confusing or incorrect. Fix it.

---
 kernel/rcu/tree.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/rcu/tree.h +2 -2
index 57a937ac51c2..fd2ba3f9eee9 100644
@@ -57,7 +57,7 @@ struct rcu_node {
 					/*  some rcu_state fields as well as */
 					/*  following. */
 	unsigned long gp_seq;	/* Track rsp->rcu_gp_seq. */
-	unsigned long gp_seq_needed; /* Track rsp->rcu_gp_seq_needed. */
+	unsigned long gp_seq_needed; /* Track the furthest future gp request seen */
 	unsigned long completedqs; /* All QSes done for this node. */
 	unsigned long qsmask;	/* CPUs or groups that need to switch in */
 				/*  order for current grace period to proceed.*/
@@ -163,7 +163,7 @@ union rcu_noqs {
 struct rcu_data {
 	/* 1) quiescent-state and grace-period handling : */
 	unsigned long	gp_seq;		/* Track rsp->rcu_gp_seq counter. */
-	unsigned long	gp_seq_needed;	/* Track rsp->rcu_gp_seq_needed ctr. */
+	unsigned long	gp_seq_needed;	/* Track the furthest future gp request seen */
 	union rcu_noqs	cpu_no_qs;	/* No QSes yet for this CPU. */
 	bool		core_needs_qs;	/* Core waits for quiesc state. */
 	bool		beenonline;	/* CPU online at least once. */
Signature · 1 line
2.19.0.444.g18242da7ef-goog
#2 lore raw

Re: [PATCH RFC 2/3] rcu: tree: Fix comment about gp_seq_needed

Quoted 4 lines · Joel Fernandes (Google)

rcu_state does not have a gp_seq_needed field. This comment therefore is confusing or incorrect. Fix it.

Good eyes, queued and pushed with edits, thank you!

(Yes, I do have a great deal of experience with punched cards. Why do you ask?)

Thanx, Paul

Quoted 29 lines
---
 kernel/rcu/tree.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/rcu/tree.h +2 -2
index 57a937ac51c2..fd2ba3f9eee9 100644
@@ -57,7 +57,7 @@ struct rcu_node {
 					/*  some rcu_state fields as well as */
 					/*  following. */
 	unsigned long gp_seq;	/* Track rsp->rcu_gp_seq. */
-	unsigned long gp_seq_needed; /* Track rsp->rcu_gp_seq_needed. */
+	unsigned long gp_seq_needed; /* Track the furthest future gp request seen */
 	unsigned long completedqs; /* All QSes done for this node. */
 	unsigned long qsmask;	/* CPUs or groups that need to switch in */
 				/*  order for current grace period to proceed.*/
@@ -163,7 +163,7 @@ union rcu_noqs {
 struct rcu_data {
 	/* 1) quiescent-state and grace-period handling : */
 	unsigned long	gp_seq;		/* Track rsp->rcu_gp_seq counter. */
-	unsigned long	gp_seq_needed;	/* Track rsp->rcu_gp_seq_needed ctr. */
+	unsigned long	gp_seq_needed;	/* Track the furthest future gp request seen */
 	union rcu_noqs	cpu_no_qs;	/* No QSes yet for this CPU. */
 	bool		core_needs_qs;	/* Core waits for quiesc state. */
 	bool		beenonline;	/* CPU online at least once. */
Signature · 1 line
2.19.0.444.g18242da7ef-goog
#3 lore raw

RFC PATCH 3/3 Documentation: RCU: Fix rcu_preempt_state reference in stallwarn

In reply to Joel Fernandes (Google)

rcu_preempt_state doesn't exist anymore. Update stallwarn documentation accordingly.

---
 Documentation/RCU/stallwarn.txt | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
Documentation/RCU/stallwarn.txt +2 -3
index 491043fd976f..b6bc7a2a9961 100644
@@ -176,9 +176,8 @@ causing stalls, and that the stall was affecting RCU-sched.  This message
 will normally be followed by stack dumps for each CPU.  Please note that
 PREEMPT_RCU builds can be stalled by tasks as well as by CPUs, and that
 the tasks will be indicated by PID, for example, "P3421".  It is even
-possible for a rcu_preempt_state stall to be caused by both CPUs -and-
-tasks, in which case the offending CPUs and tasks will all be called
-out in the list.
+possible for a rcu_state stall to be caused by both CPUs -and- tasks,
+in which case the offending CPUs and tasks will all be called out in the list.
 
 CPU 2's "(3 GPs behind)" indicates that this CPU has not interacted with
 the RCU core for the past three grace periods.  In contrast, CPU 16's "(0
Signature · 1 line
2.19.0.444.g18242da7ef-goog
#4 lore raw

Re: [PATCH RFC 3/3] Documentation: RCU: Fix rcu_preempt_state reference in stallwarn

Quoted 4 lines · Joel Fernandes (Google)

rcu_preempt_state doesn't exist anymore. Update stallwarn documentation accordingly.

Good eyes, queued and pushed with edits, including fixing a grammar nit in my original. ;-)

Thanx, Paul

Quoted 23 lines
---
 Documentation/RCU/stallwarn.txt | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
Documentation/RCU/stallwarn.txt +2 -3
index 491043fd976f..b6bc7a2a9961 100644
@@ -176,9 +176,8 @@ causing stalls, and that the stall was affecting RCU-sched.  This message
 will normally be followed by stack dumps for each CPU.  Please note that
 PREEMPT_RCU builds can be stalled by tasks as well as by CPUs, and that
 the tasks will be indicated by PID, for example, "P3421".  It is even
-possible for a rcu_preempt_state stall to be caused by both CPUs -and-
-tasks, in which case the offending CPUs and tasks will all be called
-out in the list.
+possible for a rcu_state stall to be caused by both CPUs -and- tasks,
+in which case the offending CPUs and tasks will all be called out in the list.
 
 CPU 2's "(3 GPs behind)" indicates that this CPU has not interacted with
 the RCU core for the past three grace periods.  In contrast, CPU 16's "(0
Signature · 1 line
2.19.0.444.g18242da7ef-goog
#5 lore raw
In reply to Joel Fernandes (Google)
Quoted 3 lines · Joel Fernandes (Google)

These aren't used anymore. Remove them.

Good catch, queued and pushed with subject/commit-log edits, thank you!

Thanx, Paul

Quoted 29 lines
---
 kernel/rcu/tree.h | 11 -----------
 1 file changed, 11 deletions(-)
kernel/rcu/tree.h +0 -11
index 703e19ff532d..57a937ac51c2 100644
@@ -398,17 +398,6 @@ static const char *tp_rcu_varname __used __tracepoint_string = rcu_name;
 #define RCU_NAME rcu_name
 #endif /* #else #ifdef CONFIG_TRACING */
 
-/*
- * RCU implementation internal declarations:
- */
-extern struct rcu_state rcu_sched_state;
-
-extern struct rcu_state rcu_bh_state;
-
-#ifdef CONFIG_PREEMPT_RCU
-extern struct rcu_state rcu_preempt_state;
-#endif /* #ifdef CONFIG_PREEMPT_RCU */
-
 int rcu_dynticks_snap(struct rcu_data *rdp);
 
 #ifdef CONFIG_RCU_BOOST
Signature · 1 line
2.19.0.444.g18242da7ef-goog