Skip to contentSkip to conversation

rcutorture: Use the gp_kthread_dbg operation specified by cur_ops

PATCH In review Zqiang 2 participants 2 messages Mar 15, 2024 – Mar 17, 2024

Subsystems (2)
lore
Share & tools
lore

Zqiang

author
#0 lore raw

PATCH 1/1 rcutorture: Use the gp_kthread_dbg operation specified by cur_ops

Currently, for different types of rcutorture tests, when dumping gp_kthread because of slow gp, always invoke show_rcu_gp_kthreads(). this commit therefore changes show_rcu_gp_kthreads() to cur_ops->gp_kthread_dbg() to dump the correct information in rcu_torture_writer().

---
 kernel/rcu/rcutorture.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
kernel/rcu/rcutorture.c +2 -1
index 51eebc523f08..9d269682256a 100644
@@ -1617,7 +1617,8 @@ rcu_torture_writer(void *arg)
 				if (list_empty(&rcu_tortures[i].rtort_free) &&
 				    rcu_access_pointer(rcu_torture_current) != &rcu_tortures[i]) {
 					tracing_off();
-					show_rcu_gp_kthreads();
+					if (cur_ops->gp_kthread_dbg)
+						cur_ops->gp_kthread_dbg();
 					WARN(1, "%s: rtort_pipe_count: %d\n", __func__, rcu_tortures[i].rtort_pipe_count);
 					rcu_ftrace_dump(DUMP_ALL);
 				}
Signature · 1 line
2.17.1
maintainer
#1 lore raw
Quoted 7 lines · Zqiang

Currently, for different types of rcutorture tests, when dumping gp_kthread because of slow gp, always invoke show_rcu_gp_kthreads(). this commit therefore changes show_rcu_gp_kthreads() to cur_ops->gp_kthread_dbg() to dump the correct information in rcu_torture_writer().

Good eyes, queued, thank you!

Thanx, Paul

Quoted 21 lines
---
 kernel/rcu/rcutorture.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
kernel/rcu/rcutorture.c +2 -1
index 51eebc523f08..9d269682256a 100644
@@ -1617,7 +1617,8 @@ rcu_torture_writer(void *arg)
 				if (list_empty(&rcu_tortures[i].rtort_free) &&
 				    rcu_access_pointer(rcu_torture_current) != &rcu_tortures[i]) {
 					tracing_off();
-					show_rcu_gp_kthreads();
+					if (cur_ops->gp_kthread_dbg)
+						cur_ops->gp_kthread_dbg();
 					WARN(1, "%s: rtort_pipe_count: %d\n", __func__, rcu_tortures[i].rtort_pipe_count);
 					rcu_ftrace_dump(DUMP_ALL);
 				}
Signature · 1 line
2.17.1