network - Fix a sleep/wakeup race in NFS (server), implement faster keepalives
authorMatthew Dillon <dillon@apollo.backplane.com>
Fri, 24 Sep 2010 05:36:08 +0000 (22:36 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Fri, 24 Sep 2010 05:36:08 +0000 (22:36 -0700)
commit8fdd18a45661991db8beaf8faa358aa60df62153
treed3e52b2d70a1b2dffc7d725b0ebe13ab3456ba5e
parent2a0c7c5294f5d8e2f9f8c9237e1aeed8a26c52a7
network - Fix a sleep/wakeup race in NFS (server), implement faster keepalives

* Fix a sleep/wakeup MP race in the NFS server where the server can receive
  data but fails to wakeup one of its nfsds.

* Set a faster keepalive timeout for NFS client and server.  Currently
  75 seconds (instead of 2 hours).  This solves a problem when connectivity
  is lost with the server for long enough that the server kills the
  connection, or if the server fails while processing a nfs request
  from the client.

  If the client is stuck waiting for the reply it can wind up waiting
  for the entire keepalive period before recovering, even if connectivity
  with the server is re-established.  This way the client will proactively
  determine that the connection is dead within 75 seconds and re-establish
  it.

* The value of the timeout is taken from net.inet.tcp.keepintvl
  (instead of net.inet.tcp.keepalive), which defaults to 75 seconds
  at the moment.
sys/vfs/nfs/nfs_socket.c
sys/vfs/nfs/nfs_syscalls.c