HomeFreeBSD

nfsd: Avoid acquiring a vnode for some NFSv4 Readdir operations

Description

nfsd: Avoid acquiring a vnode for some NFSv4 Readdir operations

Without this patch, a NFSv4 Readdir operation acquires the vnode for
each entry in the directory. If only the Type, Fileid, Mounted_on_fileid
and ReaddirError attributes are requested by a client, acquiring the vnode
is not necessary for non-directories. Directory vnodes must be acquired
to check for server file system mount points.

This patch avoids acquiring the vnode, as above, resulting in a 3-8%
improvement in Readdir RPC RTT for some simple tests I did.

Note that only non-rdirplus NFSv4 mounts will benefit from this change.

Tested during a recent IETF NFSv4 Bakeathon testing event.

(cherry picked from commit cd5edc7db261fb228be4044e6fdd38850eb4e9c4)

Details

Provenance
rmacklemAuthored on Oct 17 2023, 8:55 PM
Parents
rGd9e3f1a5da21: pf: add hashtable row count SDT
Branches
Unknown
Tags
Unknown