Skip to content

Commit 05b7246

Browse files
committed
rcutorture: Increase visibility of forward-progress hangs
This commit adds a few pr_alert() calls to rcutorture's forward-progress testing in order to better diagnose shutdown-time hangs. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
1 parent 2b4a7f2 commit 05b7246

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

kernel/rcu/rcutorture.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2281,6 +2281,7 @@ static void rcu_torture_fwd_prog_nr(struct rcu_fwd *rfp,
22812281
unsigned long stopat;
22822282
static DEFINE_TORTURE_RANDOM(trs);
22832283

2284+
pr_alert("%s: Starting forward-progress test %d\n", __func__, rfp->rcu_fwd_id);
22842285
if (!cur_ops->sync)
22852286
return; // Cannot do need_resched() forward progress testing without ->sync.
22862287
if (cur_ops->call && cur_ops->cb_barrier) {
@@ -2325,6 +2326,7 @@ static void rcu_torture_fwd_prog_nr(struct rcu_fwd *rfp,
23252326
if (selfpropcb) {
23262327
WRITE_ONCE(fcs.stop, 1);
23272328
cur_ops->sync(); /* Wait for running CB to complete. */
2329+
pr_alert("%s: Waiting for CBs: %pS() %d\n", __func__, cur_ops->cb_barrier, rfp->rcu_fwd_id);
23282330
cur_ops->cb_barrier(); /* Wait for queued callbacks. */
23292331
}
23302332

@@ -2353,6 +2355,7 @@ static void rcu_torture_fwd_prog_cr(struct rcu_fwd *rfp)
23532355
unsigned long stopat;
23542356
unsigned long stoppedat;
23552357

2358+
pr_alert("%s: Starting forward-progress test %d\n", __func__, rfp->rcu_fwd_id);
23562359
if (READ_ONCE(rcu_fwd_emergency_stop))
23572360
return; /* Get out of the way quickly, no GP wait! */
23582361
if (!cur_ops->call)
@@ -2414,6 +2417,7 @@ static void rcu_torture_fwd_prog_cr(struct rcu_fwd *rfp)
24142417
n_launders_cb_snap = READ_ONCE(rfp->n_launders_cb);
24152418
cver = READ_ONCE(rcu_torture_current_version) - cver;
24162419
gps = rcutorture_seq_diff(cur_ops->get_gp_seq(), gps);
2420+
pr_alert("%s: Waiting for CBs: %pS() %d\n", __func__, cur_ops->cb_barrier, rfp->rcu_fwd_id);
24172421
cur_ops->cb_barrier(); /* Wait for callbacks to be invoked. */
24182422
(void)rcu_torture_fwd_prog_cbfree(rfp);
24192423

0 commit comments

Comments
 (0)