Skip to content

Commit a33ad03

Browse files
Frederic WeisbeckerNeeraj Upadhyay (AMD)
authored andcommitted
rcu/nocb: Dump gp state even if rdp gp itself is not offloaded
When a stall is detected, the state of each NOCB CPU is dumped along with the state of each NOCB group. The latter part however is incidentally ignored if the NOCB group leader happens not to be offloaded itself. Fix this to make sure related precious informations aren't lost over a stall report. Reported-by: "Paul E. McKenney" <[email protected]> Signed-off-by: Frederic Weisbecker <[email protected]> Reviewed-by: "Paul E. McKenney" <[email protected]> Signed-off-by: Neeraj Upadhyay (AMD) <[email protected]>
1 parent 86731a2 commit a33ad03

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

kernel/rcu/tree_nocb.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1564,6 +1564,9 @@ static void show_rcu_nocb_state(struct rcu_data *rdp)
15641564
if (rdp->nocb_gp_rdp == rdp)
15651565
show_rcu_nocb_gp_state(rdp);
15661566

1567+
if (!rcu_segcblist_is_offloaded(&rdp->cblist))
1568+
return;
1569+
15671570
nocb_next_rdp = list_next_or_null_rcu(&rdp->nocb_gp_rdp->nocb_head_rdp,
15681571
&rdp->nocb_entry_rdp,
15691572
typeof(*rdp),

kernel/rcu/tree_stall.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -953,8 +953,7 @@ void show_rcu_gp_kthreads(void)
953953
for_each_possible_cpu(cpu) {
954954
rdp = per_cpu_ptr(&rcu_data, cpu);
955955
cbs += data_race(READ_ONCE(rdp->n_cbs_invoked));
956-
if (rcu_segcblist_is_offloaded(&rdp->cblist))
957-
show_rcu_nocb_state(rdp);
956+
show_rcu_nocb_state(rdp);
958957
}
959958
pr_info("RCU callbacks invoked since boot: %lu\n", cbs);
960959
show_rcu_tasks_gp_kthreads();

0 commit comments

Comments
 (0)