2018-09-22 23:42:05

by Joel Fernandes

[permalink] [raw]
Subject: [PATCH RFC 1/3] rcu: tree: Remove unused externs

These aren't used anymore. Remove them.

Signed-off-by: Joel Fernandes (Google) <[email protected]>
---
kernel/rcu/tree.h | 11 -----------
1 file changed, 11 deletions(-)

diff --git a/kernel/rcu/tree.h b/kernel/rcu/tree.h
index 703e19ff532d..57a937ac51c2 100644
--- a/kernel/rcu/tree.h
+++ b/kernel/rcu/tree.h
@@ -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
--
2.19.0.444.g18242da7ef-goog



2018-09-22 23:42:07

by Joel Fernandes

[permalink] [raw]
Subject: [PATCH RFC 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.

Signed-off-by: Joel Fernandes (Google) <[email protected]>
---
kernel/rcu/tree.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/rcu/tree.h b/kernel/rcu/tree.h
index 57a937ac51c2..fd2ba3f9eee9 100644
--- a/kernel/rcu/tree.h
+++ b/kernel/rcu/tree.h
@@ -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. */
--
2.19.0.444.g18242da7ef-goog


2018-09-22 23:42:10

by Joel Fernandes

[permalink] [raw]
Subject: [PATCH RFC 3/3] Documentation: RCU: Fix rcu_preempt_state reference in stallwarn

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

Signed-off-by: Joel Fernandes (Google) <[email protected]>
---
Documentation/RCU/stallwarn.txt | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/Documentation/RCU/stallwarn.txt b/Documentation/RCU/stallwarn.txt
index 491043fd976f..b6bc7a2a9961 100644
--- a/Documentation/RCU/stallwarn.txt
+++ b/Documentation/RCU/stallwarn.txt
@@ -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
--
2.19.0.444.g18242da7ef-goog


2018-09-23 00:37:24

by Paul E. McKenney

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

On Sat, Sep 22, 2018 at 07:41:26PM -0400, Joel Fernandes (Google) wrote:
> rcu_state does not have a gp_seq_needed field. This comment therefore is
> confusing or incorrect. Fix it.
>
> Signed-off-by: Joel Fernandes (Google) <[email protected]>

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

> ---
> kernel/rcu/tree.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/kernel/rcu/tree.h b/kernel/rcu/tree.h
> index 57a937ac51c2..fd2ba3f9eee9 100644
> --- a/kernel/rcu/tree.h
> +++ b/kernel/rcu/tree.h
> @@ -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. */
> --
> 2.19.0.444.g18242da7ef-goog
>


2018-09-23 00:37:52

by Paul E. McKenney

[permalink] [raw]
Subject: Re: [PATCH RFC 1/3] rcu: tree: Remove unused externs

On Sat, Sep 22, 2018 at 07:41:25PM -0400, Joel Fernandes (Google) wrote:
> These aren't used anymore. Remove them.
>
> Signed-off-by: Joel Fernandes (Google) <[email protected]>

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

Thanx, Paul

> ---
> kernel/rcu/tree.h | 11 -----------
> 1 file changed, 11 deletions(-)
>
> diff --git a/kernel/rcu/tree.h b/kernel/rcu/tree.h
> index 703e19ff532d..57a937ac51c2 100644
> --- a/kernel/rcu/tree.h
> +++ b/kernel/rcu/tree.h
> @@ -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
> --
> 2.19.0.444.g18242da7ef-goog
>


2018-09-23 00:39:56

by Paul E. McKenney

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

On Sat, Sep 22, 2018 at 07:41:27PM -0400, Joel Fernandes (Google) wrote:
> rcu_preempt_state doesn't exist anymore. Update stallwarn documentation
> accordingly.
>
> Signed-off-by: Joel Fernandes (Google) <[email protected]>

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

Thanx, Paul

> ---
> Documentation/RCU/stallwarn.txt | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/Documentation/RCU/stallwarn.txt b/Documentation/RCU/stallwarn.txt
> index 491043fd976f..b6bc7a2a9961 100644
> --- a/Documentation/RCU/stallwarn.txt
> +++ b/Documentation/RCU/stallwarn.txt
> @@ -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
> --
> 2.19.0.444.g18242da7ef-goog
>