locks: convert fl_link to a hlist_node
Testing has shown that iterating over the blocked_list for deadlock detection turns out to be a bottleneck. In order to alleviate that, begin the process of turning it into a hashtable. We start by turning the fl_link into a hlist_node and the global lists into hlists. A later patch will do the conversion of the blocked_list to a hashtable. Signed-off-by: Jeff Layton <jlayton@redhat.com> Acked-by: J. Bruce Fields <bfields@fieldses.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
@@ -946,7 +946,7 @@ int locks_in_grace(struct net *);
|
||||
*/
|
||||
struct file_lock {
|
||||
struct file_lock *fl_next; /* singly linked list for this inode */
|
||||
struct list_head fl_link; /* doubly linked list of all locks */
|
||||
struct hlist_node fl_link; /* node in global lists */
|
||||
struct list_head fl_block; /* circular list of blocked processes */
|
||||
fl_owner_t fl_owner;
|
||||
unsigned int fl_flags;
|
||||
|
Reference in New Issue
Block a user