diff options
author | 2020-08-07 15:42:28 +0800 | |
---|---|---|
committer | 2020-08-26 12:42:05 +0200 | |
commit | 9de0c9bbcedf752e762c67f105bff342e30f9105 (patch) | |
tree | b4995c5540c2740a11ba40dec3f1f841a0241cf1 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | lockdep: Make __bfs(.match) return bool (diff) | |
download | wireguard-linux-9de0c9bbcedf752e762c67f105bff342e30f9105.tar.xz wireguard-linux-9de0c9bbcedf752e762c67f105bff342e30f9105.zip |
lockdep: Support deadlock detection for recursive read locks in check_noncircular()
Currently, lockdep only has limit support for deadlock detection for
recursive read locks.
This patch support deadlock detection for recursive read locks. The
basic idea is:
We are about to add dependency B -> A in to the dependency graph, we use
check_noncircular() to find whether we have a strong dependency path
A -> .. -> B so that we have a strong dependency circle (a closed strong
dependency path):
A -> .. -> B -> A
, which doesn't have two adjacent dependencies as -(*R)-> L -(S*)->.
Since A -> .. -> B is already a strong dependency path, so if either
B -> A is -(E*)-> or A -> .. -> B is -(*N)->, the circle A -> .. -> B ->
A is strong, otherwise not. So we introduce a new match function
hlock_conflict() to replace the class_equal() for the deadlock check in
check_noncircular().
Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20200807074238.1632519-10-boqun.feng@gmail.com
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions