aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py
diff options
context:
space:
mode:
authorXuewen Yan <[email protected]>2024-01-10 11:27:24 +0800
committerTejun Heo <[email protected]>2024-01-16 10:20:44 -1000
commit1a65a6d17cbc58e1aeffb2be962acce49efbef9c (patch)
tree881459ba7fd95e359a4ef34397439d570a3c74b0 /tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py
parent85f0ab43f9de62a4b9c1b503b07f1c33e5a6d2ab (diff)
workqueue: Add rcu lock check at the end of work item execution
Currently the workqueue just checks the atomic and locking states after work execution ends. However, sometimes, a work item may not unlock rcu after acquiring rcu_read_lock(). And as a result, it would cause rcu stall, but the rcu stall warning can not dump the work func, because the work has finished. In order to quickly discover those works that do not call rcu_read_unlock() after rcu_read_lock(), add the rcu lock check. Use rcu_preempt_depth() to check the work's rcu status. Normally, this value is 0. If this value is bigger than 0, it means the work are still holding rcu lock. If so, print err info and the work func. tj: Reworded the description for clarity. Minor formatting tweak. Signed-off-by: Xuewen Yan <[email protected]> Reviewed-by: Lai Jiangshan <[email protected]> Reviewed-by: Waiman Long <[email protected]> Signed-off-by: Tejun Heo <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py')
0 files changed, 0 insertions, 0 deletions