public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] rcu/nocb: Check rdp_gp->nocb_timer in __call_rcu_nocb_wake()
@ 2024-01-17 10:26 Zqiang
  2024-01-17 12:07 ` Frederic Weisbecker
  0 siblings, 1 reply; 12+ messages in thread
From: Zqiang @ 2024-01-17 10:26 UTC (permalink / raw)
  To: paulmck, frederic, quic_neeraju, joel; +Cc: qiang.zhang1211, rcu, linux-kernel

Currently, only rdp_gp->nocb_timer is used, for nocb_timer of
no-rdp_gp structure, the timer_pending() is always return false,
this commit therefore need to check rdp_gp->nocb_timer in
__call_rcu_nocb_wake().

Signed-off-by: Zqiang <qiang.zhang1211@gmail.com>
---
 kernel/rcu/tree_nocb.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel/rcu/tree_nocb.h b/kernel/rcu/tree_nocb.h
index 54971afc3a9b..3f85577bddd4 100644
--- a/kernel/rcu/tree_nocb.h
+++ b/kernel/rcu/tree_nocb.h
@@ -564,6 +564,7 @@ static void __call_rcu_nocb_wake(struct rcu_data *rdp, bool was_alldone,
 	long lazy_len;
 	long len;
 	struct task_struct *t;
+	struct rcu_data *rdp_gp = rdp->nocb_gp_rdp;
 
 	// If we are being polled or there is no kthread, just leave.
 	t = READ_ONCE(rdp->nocb_gp_kthread);
@@ -608,7 +609,7 @@ static void __call_rcu_nocb_wake(struct rcu_data *rdp, bool was_alldone,
 		smp_mb(); /* Enqueue before timer_pending(). */
 		if ((rdp->nocb_cb_sleep ||
 		     !rcu_segcblist_ready_cbs(&rdp->cblist)) &&
-		    !timer_pending(&rdp->nocb_timer)) {
+		    !timer_pending(&rdp_gp->nocb_timer)) {
 			rcu_nocb_unlock(rdp);
 			wake_nocb_gp_defer(rdp, RCU_NOCB_WAKE_FORCE,
 					   TPS("WakeOvfIsDeferred"));
-- 
2.17.1


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

end of thread, other threads:[~2024-01-24  4:44 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-17 10:26 [PATCH] rcu/nocb: Check rdp_gp->nocb_timer in __call_rcu_nocb_wake() Zqiang
2024-01-17 12:07 ` Frederic Weisbecker
2024-01-18 14:51   ` Paul E. McKenney
2024-01-18 14:54     ` Paul E. McKenney
2024-01-19 21:47     ` Frederic Weisbecker
2024-01-20  0:29       ` Paul E. McKenney
2024-01-22 12:07         ` Paul E. McKenney
2024-01-22 12:11           ` Paul E. McKenney
2024-01-22 21:41             ` Frederic Weisbecker
2024-01-23 10:48               ` Paul E. McKenney
2024-01-23 12:31                 ` Paul E. McKenney
2024-01-24  4:44       ` Z qiang

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