aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBoqun Feng <[email protected]>2020-08-07 15:42:24 +0800
committerPeter Zijlstra <[email protected]>2020-08-26 12:42:04 +0200
commitbd76eca10de2eb9998d5125b08e8997cbf5508d5 (patch)
tree0e44eb90aba2709830cef110dbaceaaf89acaeb2 /include
parentd563bc6ead9e79be37067d58509a605b67378184 (diff)
lockdep: Reduce the size of lock_list::distance
lock_list::distance is always not greater than MAX_LOCK_DEPTH (which is 48 right now), so a u16 will fit. This patch reduces the size of lock_list::distance to save space, so that we can introduce other fields to help detect recursive read lock deadlocks without increasing the size of lock_list structure. Suggested-by: Peter Zijlstra <[email protected]> Signed-off-by: Boqun Feng <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
Diffstat (limited to 'include')
-rw-r--r--include/linux/lockdep.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h
index 7cae5ea00d59..22750102b5fe 100644
--- a/include/linux/lockdep.h
+++ b/include/linux/lockdep.h
@@ -54,7 +54,7 @@ struct lock_list {
struct lock_class *class;
struct lock_class *links_to;
const struct lock_trace *trace;
- int distance;
+ u16 distance;
/*
* The parent field is used to implement breadth-first search, and the