freebsd-skq/sys/compat/svr4
Doug Rabson dfdcada31e Add the new kernel-mode NFS Lock Manager. To use it instead of the
user-mode lock manager, build a kernel with the NFSLOCKD option and
add '-k' to 'rpc_lockd_flags' in rc.conf.

Highlights include:

* Thread-safe kernel RPC client - many threads can use the same RPC
  client handle safely with replies being de-multiplexed at the socket
  upcall (typically driven directly by the NIC interrupt) and handed
  off to whichever thread matches the reply. For UDP sockets, many RPC
  clients can share the same socket. This allows the use of a single
  privileged UDP port number to talk to an arbitrary number of remote
  hosts.

* Single-threaded kernel RPC server. Adding support for multi-threaded
  server would be relatively straightforward and would follow
  approximately the Solaris KPI. A single thread should be sufficient
  for the NLM since it should rarely block in normal operation.

* Kernel mode NLM server supporting cancel requests and granted
  callbacks. I've tested the NLM server reasonably extensively - it
  passes both my own tests and the NFS Connectathon locking tests
  running on Solaris, Mac OS X and Ubuntu Linux.

* Userland NLM client supported. While the NLM server doesn't have
  support for the local NFS client's locking needs, it does have to
  field async replies and granted callbacks from remote NLMs that the
  local client has contacted. We relay these replies to the userland
  rpc.lockd over a local domain RPC socket.

* Robust deadlock detection for the local lock manager. In particular
  it will detect deadlocks caused by a lock request that covers more
  than one blocking request. As required by the NLM protocol, all
  deadlock detection happens synchronously - a user is guaranteed that
  if a lock request isn't rejected immediately, the lock will
  eventually be granted. The old system allowed for a 'deferred
  deadlock' condition where a blocked lock request could wake up and
  find that some other deadlock-causing lock owner had beaten them to
  the lock.

* Since both local and remote locks are managed by the same kernel
  locking code, local and remote processes can safely use file locks
  for mutual exclusion. Local processes have no fairness advantage
  compared to remote processes when contending to lock a region that
  has just been unlocked - the local lock manager enforces a strict
  first-come first-served model for both local and remote lockers.

Sponsored by:	Isilon Systems
PR:		95247 107555 115524 116679
MFC after:	2 weeks
2008-03-26 15:23:12 +00:00
..
imgact_svr4.c VOP_LOCK1() (and so VOP_LOCK()) and VOP_UNLOCK() are only used in 2008-01-13 14:44:15 +00:00
Makefile Housekeeping. Update for maintainers who have handed in their commit bits 2006-07-01 10:51:55 +00:00
svr4_acl.h
svr4_dirent.h
svr4_errno.h
svr4_exec.h
svr4_fcntl.c Add the new kernel-mode NFS Lock Manager. To use it instead of the 2008-03-26 15:23:12 +00:00
svr4_fcntl.h
svr4_filio.c Replace custom file descriptor array sleep lock constructed using a mutex 2007-04-04 09:11:34 +00:00
svr4_filio.h
svr4_fuser.h
svr4_hrt.h
svr4_ioctl.c Back out alpha/alpha/trap.c:1.124, osf1_ioctl.c:1.14, osf1_misc.c:1.57, 2005-09-28 07:03:03 +00:00
svr4_ioctl.h
svr4_ipc.c Rework kern_semctl a bit to always assume the UIO_SYSSPACE case. This 2006-07-08 19:51:38 +00:00
svr4_ipc.h
svr4_misc.c VOP_LOCK1() (and so VOP_LOCK()) and VOP_UNLOCK() are only used in 2008-01-13 14:44:15 +00:00
svr4_mman.h
svr4_proto.h Regen. 2006-11-11 21:49:08 +00:00
svr4_resource.c
svr4_resource.h
svr4_siginfo.h Fix compiling problem by adding prefix name svr4 to si_xxx macro, the 2005-10-19 09:33:15 +00:00
svr4_signal.c Back out alpha/alpha/trap.c:1.124, osf1_ioctl.c:1.14, osf1_misc.c:1.57, 2005-09-28 07:03:03 +00:00
svr4_signal.h 1. Change prototype of trapsignal and sendsig to use ksiginfo_t *, most 2005-10-14 12:43:47 +00:00
svr4_socket.c Clean up the svr4 socket cache and streams code some to make it more easily 2006-07-21 20:40:13 +00:00
svr4_socket.h Clean up the svr4 socket cache and streams code some to make it more easily 2006-07-21 20:40:13 +00:00
svr4_sockio.c Use TAILQ_EMPTY instead of checking if TAILQ_FIRST is NULL. 2006-08-04 21:15:09 +00:00
svr4_sockio.h
svr4_sockmod.h
svr4_stat.c Remove two hypothetical calls to suser() in ifdef'd (and uncompilable) 2006-09-02 08:18:22 +00:00
svr4_stat.h
svr4_statvfs.h
svr4_stream.c Remove explicit locking of struct file. 2007-12-30 01:42:15 +00:00
svr4_stropts.h - Explicitly lock Giant to protect the fields in the svr4_strm structure 2006-07-28 16:56:17 +00:00
svr4_syscall.h Regen for MPSAFE flag removal. 2006-07-28 19:08:37 +00:00
svr4_syscallnames.c Regen for MPSAFE flag removal. 2006-07-28 19:08:37 +00:00
svr4_sysconfig.h
svr4_sysent.c Regen to propogate <prefix>_AUE_<mumble> changes as well as the earlier 2006-08-15 17:37:01 +00:00
svr4_systeminfo.h
svr4_sysvec.c - The P_SA flag has been removed. Don't reference it in a KASSERT. 2008-03-12 22:17:06 +00:00
svr4_termios.c Back out alpha/alpha/trap.c:1.124, osf1_ioctl.c:1.14, osf1_misc.c:1.57, 2005-09-28 07:03:03 +00:00
svr4_termios.h
svr4_time.h
svr4_timod.h
svr4_ttold.c Back out alpha/alpha/trap.c:1.124, osf1_ioctl.c:1.14, osf1_misc.c:1.57, 2005-09-28 07:03:03 +00:00
svr4_ttold.h
svr4_types.h
svr4_ucontext.h
svr4_ulimit.h
svr4_ustat.h
svr4_util.h - Split out kern_accept(), kern_getpeername(), and kern_getsockname() for 2006-07-10 21:38:17 +00:00
svr4_utsname.h
svr4_wait.h
svr4.h - Stop hardcoding #define's for options and use the appropriate 2005-07-13 15:14:33 +00:00
syscalls.conf - Remove unused sysvec variables from various syscalls.conf. 2006-08-15 17:25:55 +00:00
syscalls.master Now that all system calls are MPSAFE, retire the SYF_MPSAFE flag used to 2006-07-28 19:05:28 +00:00