diff options
| author | Kumar Kartikeya Dwivedi <memxor@gmail.com> | 2025-11-28 23:27:58 +0000 |
|---|---|---|
| committer | Alexei Starovoitov <ast@kernel.org> | 2025-11-29 09:35:35 -0800 |
| commit | 5860f5ce479f42b29fabab8f668859f13cae44bb (patch) | |
| tree | 4edc3d7ea1d9effe2ea4bc1d2912f037c3f7e97f /tools/lib/python/kdoc/enrich_formatter.py | |
| parent | beb7021a6003d9c6a463fffca0d6311efb8e0e66 (diff) | |
rqspinlock: Perform AA checks immediately
Currently, while we enter the check_timeout call immediately due to the
way the ts.spin is initialized, we still invoke the AA and ABBA checks
in the second invocation, and only initialize the timestamp in the first
one. Since each iteration is at least done with a 1ms delay, this can
add delays in detection of AA deadlocks, up to a ms.
Rework check_timeout() to avoid this. First, call check_deadlock_AA()
while initializing the timestamps for the wait period. This also means
that we only do it once per waiting period, instead of every invocation.
Finally, drop check_deadlock() and call check_deadlock_ABBA() directly.
To save on unnecessary ktime_get_mono_fast_ns() in case of AA deadlock,
sample the time only if it returns 0.
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Link: https://lore.kernel.org/r/20251128232802.1031906-3-memxor@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/lib/python/kdoc/enrich_formatter.py')
0 files changed, 0 insertions, 0 deletions
