diff options
author | Jeff Layton <jlayton@redhat.com> | 2013-06-21 14:58:18 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-06-29 10:57:44 +0200 |
commit | 48f74186546cd5929397856eab209ebcb5692d11 (patch) | |
tree | 9a4bf88cd5171f470eeae0ba4f62d5b5b9d06fc7 /include | |
parent | locks: convert fl_link to a hlist_node (diff) | |
download | linux-48f74186546cd5929397856eab209ebcb5692d11.tar.xz linux-48f74186546cd5929397856eab209ebcb5692d11.zip |
locks: turn the blocked_list into a hashtable
Break up the blocked_list into a hashtable, using the fl_owner as a key.
This speeds up searching the hash chains, which is especially significant
for deadlock detection.
Note that the initial implementation assumes that hashing on fl_owner is
sufficient. In most cases it should be, with the notable exception being
server-side lockd, which compares ownership using a tuple of the
nlm_host and the pid sent in the lock request. So, this may degrade to a
single hash bucket when you only have a single NFS client. That will be
addressed in a later patch.
The careful observer may note that this patch leaves the file_lock_list
alone. There's much less of a case for turning the file_lock_list into a
hashtable. The only user of that list is the code that generates
/proc/locks, and it always walks the entire list.
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>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions