diff options
author | Paul E. McKenney <paulmck@kernel.org> | 2021-12-06 16:19:40 -0800 |
---|---|---|
committer | Paul E. McKenney <paulmck@kernel.org> | 2022-06-20 09:22:26 -0700 |
commit | 4cf0585c4d663654fefa0b359f1908b5cd72802b (patch) | |
tree | 355ac8b86e791b745e4083b124e843a1770a96d8 /kernel/rcu | |
parent | a111daf0c53ae91e71fd2bfe7497862d14132e3e (diff) | |
download | lwn-4cf0585c4d663654fefa0b359f1908b5cd72802b.tar.gz lwn-4cf0585c4d663654fefa0b359f1908b5cd72802b.zip |
rcu-tasks: Check for abandoned callbacks
This commit adds a debugging scan for callbacks that got lost during a
callback-queueing transition.
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'kernel/rcu')
-rw-r--r-- | kernel/rcu/tasks.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/rcu/tasks.h b/kernel/rcu/tasks.h index 3925e32159b5..b8690a412c5b 100644 --- a/kernel/rcu/tasks.h +++ b/kernel/rcu/tasks.h @@ -439,6 +439,11 @@ static int rcu_tasks_need_gpcb(struct rcu_tasks *rtp) WRITE_ONCE(rtp->percpu_dequeue_lim, 1); pr_info("Completing switch %s to CPU-0 callback queuing.\n", rtp->name); } + for (cpu = rtp->percpu_dequeue_lim; cpu < nr_cpu_ids; cpu++) { + struct rcu_tasks_percpu *rtpcp = per_cpu_ptr(rtp->rtpcpu, cpu); + + WARN_ON_ONCE(rcu_segcblist_n_cbs(&rtpcp->cblist)); + } raw_spin_unlock_irqrestore(&rtp->cbs_gbl_lock, flags); } |