All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] rcu/torture: Change order of warning and trace dump
@ 2022-04-11 15:19 Anna-Maria Behnsen
  2022-04-11 18:09 ` Paul E. McKenney
  0 siblings, 1 reply; 7+ messages in thread
From: Anna-Maria Behnsen @ 2022-04-11 15:19 UTC (permalink / raw)
  To: linux-kernel, rcu; +Cc: Thomas Gleixner, Paul E . McKenney, Benedikt Spranger

Dumping a big ftrace buffer could lead to a RCU stall. So there is the
ftrace buffer and the stall information which needs to be printed. When
there is additionaly a WARN_ON() which describes the reason for the ftrace
buffer dump and the WARN_ON() is executed _after_ ftrace buffer dump, the
information get lost in the middle of the RCU stall information.

Therefore print WARN_ON() message before dumping the ftrace buffer in
rcu_torture_writer().

Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
Reviewed-by: Benedikt Spranger <b.spranger@linutronix.de>
---
 kernel/rcu/rcutorture.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c
index 55d049c39608..cbbe37d7701e 100644
--- a/kernel/rcu/rcutorture.c
+++ b/kernel/rcu/rcutorture.c
@@ -1287,8 +1287,8 @@ rcu_torture_writer(void *arg)
 				if (list_empty(&rcu_tortures[i].rtort_free) &&
 				    rcu_access_pointer(rcu_torture_current) !=
 				    &rcu_tortures[i]) {
-					rcu_ftrace_dump(DUMP_ALL);
 					WARN(1, "%s: rtort_pipe_count: %d\n", __func__, rcu_tortures[i].rtort_pipe_count);
+					rcu_ftrace_dump(DUMP_ALL);
 				}
 		if (stutter_waited)
 			sched_set_normal(current, oldnice);
-- 
2.20.1


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

end of thread, other threads:[~2022-04-19 13:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-11 15:19 [PATCH] rcu/torture: Change order of warning and trace dump Anna-Maria Behnsen
2022-04-11 18:09 ` Paul E. McKenney
2022-04-12 15:25   ` Paul E. McKenney
2022-04-19  6:53     ` Anna-Maria Behnsen
2022-04-19 13:44       ` Paul E. McKenney
2022-04-18 18:50   ` Paul E. McKenney
2022-04-19  6:28     ` Anna-Maria Behnsen

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.