lkml.org 
[lkml]   [2019]   [Aug]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v4 05/30] locking/lockdep: Add lock chain list_head field in struct lock_list and lock_chain
Date
A direct lock dependency, such as L1 -> L2, can be in different lock chains
having that lock dependency. In order for us to associate lock chains to
lock dependencies, we add some new fields in struct lock_list and
lock_chain.

No functional change.

Signed-off-by: Yuyang Du <duyuyang@gmail.com>
---
include/linux/lockdep.h | 3 +++
1 file changed, 3 insertions(+)

diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h
index b8a835f..d7bec61 100644
--- a/include/linux/lockdep.h
+++ b/include/linux/lockdep.h
@@ -188,6 +188,7 @@ static inline void lockdep_copy_map(struct lockdep_map *to,
*/
struct lock_list {
struct list_head entry;
+ struct list_head chains;
struct lock_class *class;
struct lock_class *links_to;
const struct lock_trace *trace;
@@ -207,6 +208,7 @@ struct lock_list {
* @depth: the number of held locks in this chain
* @base: the index in chain_hlocks for this chain
* @entry: the collided lock chains in lock_chain hash list
+ * @chain_entry: the link to the next lock_chain in the same dependency
* @chain_key: the hash key of this lock_chain
*/
struct lock_chain {
@@ -216,6 +218,7 @@ struct lock_chain {
base : 24;
/* 4 byte hole */
struct hlist_node entry;
+ struct list_head chain_entry;
u64 chain_key;
};

--
1.8.3.1
\
 
 \ /
  Last update: 2019-08-29 10:33    [W:0.159 / U:14.556 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site