nfsd4: improve write performance with better sendspace reservations
authorJ. Bruce Fields <bfields@redhat.com>
Tue, 5 Nov 2013 20:07:16 +0000 (15:07 -0500)
committerJ. Bruce Fields <bfields@redhat.com>
Wed, 13 Nov 2013 21:12:54 +0000 (16:12 -0500)
commit6ff40decff0ef35a5d755ec60182d7f803356dfb
tree1dc4117cbd90e5b560d0ba1d8575148d03f0e844
parent587ac5ee6f9f912926abe34bb323c6f87d53f137
nfsd4: improve write performance with better sendspace reservations

Currently the rpc code conservatively refuses to accept rpc's from a
client if the sum of its worst-case estimates of the replies it owes
that client exceed the send buffer space.

Unfortunately our estimate of the worst-case reply for an NFSv4 compound
is always the maximum read size.  This can unnecessarily limit the
number of operations we handle concurrently, for example in the case
most operations are writes (which have small replies).

We can do a little better if we check which ops the compound contains.

This is still a rough estimate, we'll need to improve on it some day.

Reported-by: Shyam Kaushik <shyamnfs1@gmail.com>
Tested-by: Shyam Kaushik <shyamnfs1@gmail.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfs4xdr.c