]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC: r326544
authorrmacklem <rmacklem@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Tue, 19 Dec 2017 23:00:08 +0000 (23:00 +0000)
committerrmacklem <rmacklem@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Tue, 19 Dec 2017 23:00:08 +0000 (23:00 +0000)
commitbe4029189f26020e0916071dc909960ce8a062e6
tree4e00a351ca2224390ed857ce85ac00e582305730
parent511a8c44c76aa5a5ba125e66575be38492abfe13
MFC: r326544
Avoid the overhead of acquiring a lock in nfsrv_checkgetattr() when
there are no write delegations issued.

manu@ reported on the freebsd-current@ mailing list that there was
a significant performance hit in nfsrv_checkgetattr() caused by
the acquisition/release of a state lock, even when there were no
write delegations issued.
This patch add a count of outstanding issued write delegations to the
NFSv4 server. This count allows nfsrv_checkgetattr() to return without
acquiring any lock when the count is 0, avoiding the performance hit
for the case where no write delegations are issued.

git-svn-id: svn://svn.freebsd.org/base/stable/10@327008 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/fs/nfsserver/nfs_nfsdstate.c