freebsd-dev/sys
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
..
amd64 Rename timer0_max_count to i8254_max_count. 2008-03-26 15:03:24 +00:00
arm We need to prototype _start() as well, as we use it to test if we're running 2008-03-22 20:34:07 +00:00
boot Fix some "in in" typos in comments. 2008-03-26 07:32:08 +00:00
bsm Merge OpenBSM 1.0 changes to src/sys/bsm: 2007-10-29 18:47:25 +00:00
cam Locking in the ses_ioctl handler doesn't have to be so strict because 2008-03-17 17:18:16 +00:00
cddl Add the new kernel-mode NFS Lock Manager. To use it instead of the 2008-03-26 15:23:12 +00:00
compat Add the new kernel-mode NFS Lock Manager. To use it instead of the 2008-03-26 15:23:12 +00:00
conf Add the new kernel-mode NFS Lock Manager. To use it instead of the 2008-03-26 15:23:12 +00:00
contrib Add the new kernel-mode NFS Lock Manager. To use it instead of the 2008-03-26 15:23:12 +00:00
crypto Make test00 compilable again. 2008-01-15 18:34:47 +00:00
ddb enable dynamic addition of "show all" commands 2008-03-25 20:36:32 +00:00
dev Rename timer0_max_count to i8254_max_count. 2008-03-26 15:03:24 +00:00
fs Add the new kernel-mode NFS Lock Manager. To use it instead of the 2008-03-26 15:23:12 +00:00
gdb Commit SYSINIT() ;-adding patch missed in previous pass. 2008-03-16 13:02:04 +00:00
geom Redefine G_PART_SCHEME_DECLARE() from populating a private linker set 2008-03-23 01:31:59 +00:00
gnu Introduce some functions in the vnode locks namespace and in the ffs 2008-02-24 16:38:58 +00:00
i4b Spelling fix for interupt -> interrupt 2007-10-12 06:03:46 +00:00
i386 Add the new kernel-mode NFS Lock Manager. To use it instead of the 2008-03-26 15:23:12 +00:00
ia64 Simplify the interrupt code a bit: 2008-03-17 22:42:01 +00:00
isa Rename timer0_max_count to i8254_max_count. 2008-03-26 15:03:24 +00:00
kern Add the new kernel-mode NFS Lock Manager. To use it instead of the 2008-03-26 15:23:12 +00:00
libkern Add prototype for __cmpd2(). 2008-02-23 22:40:05 +00:00
modules Add support for Marvell Libertas 88W8335 based PCI network adapters. 2008-03-25 06:32:33 +00:00
net expose if_purgemaddrs, it will be used by the vap code unless someone 2008-03-25 21:23:32 +00:00
net80211 Fix adhoc mode to scan all available channels for a bss to join 2008-02-29 04:07:07 +00:00
netatalk Replaced the misleading uses of a historical artefact M_TRYWAIT with M_WAIT. 2008-03-25 09:39:02 +00:00
netatm Replaced the misleading uses of a historical artefact M_TRYWAIT with M_WAIT. 2008-03-25 09:39:02 +00:00
netgraph Rewrite node to support multiple hooks, alike to ng_l2tp, to use one pair 2008-03-24 22:55:22 +00:00
netinet Replaced the misleading uses of a historical artefact M_TRYWAIT with M_WAIT. 2008-03-25 09:39:02 +00:00
netinet6 Replaced the misleading uses of a historical artefact M_TRYWAIT with M_WAIT. 2008-03-25 09:39:02 +00:00
netipsec Fix a bug that when getting/dumping the soft lifetime we reported 2008-03-24 15:01:20 +00:00
netipx Make tcpstates[] static, and make sure TCPSTATES is defined before 2007-07-30 11:06:42 +00:00
netnatm
netncp Replaced the misleading uses of a historical artefact M_TRYWAIT with M_WAIT. 2008-03-25 09:39:02 +00:00
netsmb Replaced the misleading uses of a historical artefact M_TRYWAIT with M_WAIT. 2008-03-25 09:39:02 +00:00
nfs Replaced the misleading uses of a historical artefact M_TRYWAIT with M_WAIT. 2008-03-25 09:39:02 +00:00
nfs4client Add the new kernel-mode NFS Lock Manager. To use it instead of the 2008-03-26 15:23:12 +00:00
nfsclient Add the new kernel-mode NFS Lock Manager. To use it instead of the 2008-03-26 15:23:12 +00:00
nfsserver Replaced the misleading uses of a historical artefact M_TRYWAIT with M_WAIT. 2008-03-25 09:39:02 +00:00
nlm Add the new kernel-mode NFS Lock Manager. To use it instead of the 2008-03-26 15:23:12 +00:00
opencrypto Make ftruncate a 'struct file' operation rather than a vnode operation. 2008-01-07 20:05:19 +00:00
pc98 Rename timer0_max_count to i8254_max_count. 2008-03-26 15:03:24 +00:00
pccard
pci Replaced the misleading uses of a historical artefact M_TRYWAIT with M_WAIT. 2008-03-25 09:39:02 +00:00
powerpc Simplify the interrupt code a bit: 2008-03-17 22:42:01 +00:00
rpc Add the new kernel-mode NFS Lock Manager. To use it instead of the 2008-03-26 15:23:12 +00:00
security In keeping with style(9)'s recommendations on macros, use a ';' 2008-03-16 10:58:09 +00:00
sparc64 - Const'ify the bus_stream_asi and bus_type_asi arrays. 2008-03-24 17:57:01 +00:00
sun4v Remove old sysctl stuff which is long gone in other arch's. 2008-03-26 13:03:51 +00:00
sys Add the new kernel-mode NFS Lock Manager. To use it instead of the 2008-03-26 15:23:12 +00:00
tools Introduce a standalone shell script for embedding MFS image. 2008-02-05 10:46:30 +00:00
ufs Add the new kernel-mode NFS Lock Manager. To use it instead of the 2008-03-26 15:23:12 +00:00
vm Do not dereference cdev->si_cdevsw, use the dev_refthread() to properly 2008-03-20 16:08:42 +00:00
xdr Add the new kernel-mode NFS Lock Manager. To use it instead of the 2008-03-26 15:23:12 +00:00
Makefile o Add boot, gdb, nfsserver and opencrypto dirs to CSCOPEDIRS; sort. 2008-01-23 08:50:34 +00:00