]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
nfscl: Add hash lists for the NFSv4 opens
authorRick Macklem <rmacklem@FreeBSD.org>
Sat, 22 May 2021 21:51:38 +0000 (14:51 -0700)
committerRick Macklem <rmacklem@FreeBSD.org>
Sat, 22 May 2021 21:53:56 +0000 (14:53 -0700)
commit3f7e14ad93454476bb11b4b8de5b41930d13312e
treeaa88dd917fad1a6308ce0dc8e4ccc26bcef59bc7
parent33c1bdfc3e098862100bab7a8dc729d8c78ffa7c
nfscl: Add hash lists for the NFSv4 opens

A problem was reported via email, where a large (130000+) accumulation
of NFSv4 opens on an NFSv4 mount caused significant lock contention
on the mutex used to protect the client mount's open/lock state.
Although the root cause for the accumulation of opens was not
resolved, it is obvious that the NFSv4 client is not designed to
handle 100000+ opens efficiently.  When searching for an open,
usually for a match by file handle, a linear search of all opens
is done.

This patch adds a table of hash lists for the opens, hashed on
file handle.  This table will be used by future commits to
search for an open based on file handle more efficiently.

MFC after: 2 weeks
sys/fs/nfs/nfsclstate.h
sys/fs/nfsclient/nfs_clstate.c