All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] RCU: Adjust comments for force_qs_rnp
@ 2019-03-20  3:33 Zhouyi Zhou
  2019-03-20 16:35 ` Paul E. McKenney
  0 siblings, 1 reply; 2+ messages in thread
From: Zhouyi Zhou @ 2019-03-20  3:33 UTC (permalink / raw)
  To: paulmck, paulmck, josh, rostedt, mathieu.desnoyers, jiangshanlai,
	joel, linux-kernel
  Cc: Zhouyi Zhou

Previously, threads blocked on offlining CPUS are migrated to root
rcu_node, so there is a need to initiate RCU priority boosting on root
rcu_node,

Current RCU does not migrate blocked tasks even if all corresponding CPUs
offline. 
commit d19fb8d1f3f6 ("rcu: Don't migrate blocked tasks even if all corresponding CPUs offline")'

Consequently, rcu does not initiate RCU priority boosting on root rcu_node.
commit 1be0085b515e ("rcu: Don't initiate RCU priority boosting on root rcu_node")'

So I think the comments for force_qs_rnp should be adjusted.

Signed-off-by: Zhouyi Zhou <zhouzhouyi@gmail.com>
---
 kernel/rcu/tree.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index acd6ccf..efddffb 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -2548,9 +2548,9 @@ void rcu_sched_clock_irq(int user)
 }
 
 /*
- * Scan the leaf rcu_node structures, processing dyntick state for any that
- * have not yet encountered a quiescent state, using the function specified.
- * Also initiate boosting for any threads blocked on the root rcu_node.
+ * Scan the leaf rcu_node structures, initiating boost for any threads blocked
+ * on them, processing dyntick state for any that have not yet encountered a
+ * quiescent state, using the function specified.
  *
  * The caller must have suppressed start of new grace periods.
  */
-- 
2.1.4


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

* Re: [PATCH] RCU: Adjust comments for force_qs_rnp
  2019-03-20  3:33 [PATCH] RCU: Adjust comments for force_qs_rnp Zhouyi Zhou
@ 2019-03-20 16:35 ` Paul E. McKenney
  0 siblings, 0 replies; 2+ messages in thread
From: Paul E. McKenney @ 2019-03-20 16:35 UTC (permalink / raw)
  To: Zhouyi Zhou
  Cc: josh, rostedt, mathieu.desnoyers, jiangshanlai, joel, linux-kernel

On Wed, Mar 20, 2019 at 03:33:00AM +0000, Zhouyi Zhou wrote:
> Previously, threads blocked on offlining CPUS are migrated to root
> rcu_node, so there is a need to initiate RCU priority boosting on root
> rcu_node,
> 
> Current RCU does not migrate blocked tasks even if all corresponding CPUs
> offline. 
> commit d19fb8d1f3f6 ("rcu: Don't migrate blocked tasks even if all corresponding CPUs offline")'
> 
> Consequently, rcu does not initiate RCU priority boosting on root rcu_node.
> commit 1be0085b515e ("rcu: Don't initiate RCU priority boosting on root rcu_node")'
> 
> So I think the comments for force_qs_rnp should be adjusted.
> 
> Signed-off-by: Zhouyi Zhou <zhouzhouyi@gmail.com>

Great catch, thank you!  I have queued it with wordsmithing as shown
below.  Please let me know if I messed anything up.

							Thanx, Paul

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

commit 24bbb0754fdfabe3976c42e82620d1d1a86da9d6
Author: Zhouyi Zhou <zhouzhouyi@gmail.com>
Date:   Wed Mar 20 03:33:00 2019 +0000

    rcu: Fix force_qs_rnp() header comment
    
    Previously, threads blocked on offlining CPUS were migrated to the
    root rcu_node structure, thus requiring RCU priority boosting on this
    structure.  However, since commit d19fb8d1f3f6 ("rcu: Don't migrate
    blocked tasks even if all corresponding CPUs offline"), RCU does not
    migrate blocked tasks.  Consequently, RCU no longer does RCU priority
    boosting on the root rcu_node structure as of commit 1be0085b515e ("rcu:
    Don't initiate RCU priority boosting on root rcu_node").
    
    This commit therefore brings comments for the force_qs_rnp() function's
    header comment in line with this new no-root-boosting reality.
    
    Signed-off-by: Zhouyi Zhou <zhouzhouyi@gmail.com>
    [ paulmck: Also remove obsolete comment on suppressing new grace periods. ]
    Signed-off-by: Paul E. McKenney <paulmck@linux.ibm.com>

diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index c719929c9316..961dbc7b8949 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -2171,11 +2171,11 @@ void rcu_sched_clock_irq(int user)
 }
 
 /*
- * Scan the leaf rcu_node structures, processing dyntick state for any that
- * have not yet encountered a quiescent state, using the function specified.
- * Also initiate boosting for any threads blocked on the root rcu_node.
- *
- * The caller must have suppressed start of new grace periods.
+ * Scan the leaf rcu_node structures.  For each structure on which all
+ * CPUs have reported a quiescent state and on which there are tasks
+ * blocking the current grace period, initiate RCU priority boosting.
+ * Otherwise, invoke the specified function to check dyntick state for
+ * each CPU that has not yet reported a quiescent state.
  */
 static void force_qs_rnp(int (*f)(struct rcu_data *rdp))
 {


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

end of thread, other threads:[~2019-03-20 16:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-20  3:33 [PATCH] RCU: Adjust comments for force_qs_rnp Zhouyi Zhou
2019-03-20 16:35 ` Paul E. McKenney

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.