HomeFreeBSD

nfscl: Add hash lists for the NFSv4 opens

Description

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.

(cherry picked from commit 3f7e14ad93454476bb11b4b8de5b41930d13312e)

Details

Provenance
rmacklemAuthored on May 22 2021, 9:51 PM
Parents
rG364c6a71a840: pf: Fix more ioctl memory leaks
Branches
Unknown
Tags
Unknown