Do a better job distributing RPC requests on the NFS server side. This
authorMatthew Dillon <dillon@dragonflybsd.org>
Sun, 27 Mar 2005 23:51:42 +0000 (23:51 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Sun, 27 Mar 2005 23:51:42 +0000 (23:51 +0000)
commit525530284d47ca7d16ec4afeab26c909a1e99451
treea9be0565d9fa2a6acadaa2954d0a3e3598bf4fb5
parent774fc796cf22674bec3d6fd24c8060464dfec38b
Do a better job distributing RPC requests on the NFS server side.  This
applies to both TCP and UDP mounts.

Previously when multiple requests were received all at once only one would
be immediately distributed to an idle NFSD, causing the requests to be
serialized on the server if no other nfsd's were active at the time and if
no other event occurs to wake up other idle nfsd's.

Now nfsrv_getstream() returns a count of the number of RPCs that were parsed
and multiple NFSDs will be woken up to process them.

Some fine-tuning is still required.  In particular, it is actually less
efficient for the server to wakeup multiple NFSd (at least on a UP machine)
if the requests do not entail I/O.  However, since this only effects client
operations that are issued in parallel (e.g. a make -j build on the client)
I believe the positive aspects outweight the negative ones.
sys/vfs/nfs/nfs.h
sys/vfs/nfs/nfs_nqlease.c
sys/vfs/nfs/nfs_socket.c
sys/vfs/nfs/nfs_syscalls.c