freebsd-skq/sys/fs
Attilio Rao 89f6b8632c Switch the vm_object mutex to be a rwlock. This will enable in the
future further optimizations where the vm_object lock will be held
in read mode most of the time the page cache resident pool of pages
are accessed for reading purposes.

The change is mostly mechanical but few notes are reported:
* The KPI changes as follow:
  - VM_OBJECT_LOCK() -> VM_OBJECT_WLOCK()
  - VM_OBJECT_TRYLOCK() -> VM_OBJECT_TRYWLOCK()
  - VM_OBJECT_UNLOCK() -> VM_OBJECT_WUNLOCK()
  - VM_OBJECT_LOCK_ASSERT(MA_OWNED) -> VM_OBJECT_ASSERT_WLOCKED()
    (in order to avoid visibility of implementation details)
  - The read-mode operations are added:
    VM_OBJECT_RLOCK(), VM_OBJECT_TRYRLOCK(), VM_OBJECT_RUNLOCK(),
    VM_OBJECT_ASSERT_RLOCKED(), VM_OBJECT_ASSERT_LOCKED()
* The vm/vm_pager.h namespace pollution avoidance (forcing requiring
  sys/mutex.h in consumers directly to cater its inlining functions
  using VM_OBJECT_LOCK()) imposes that all the vm/vm_pager.h
  consumers now must include also sys/rwlock.h.
* zfs requires a quite convoluted fix to include FreeBSD rwlocks into
  the compat layer because the name clash between FreeBSD and solaris
  versions must be avoided.
  At this purpose zfs redefines the vm_object locking functions
  directly, isolating the FreeBSD components in specific compat stubs.

The KPI results heavilly broken by this commit.  Thirdy part ports must
be updated accordingly (I can think off-hand of VirtualBox, for example).

Sponsored by:	EMC / Isilon storage division
Reviewed by:	jeff
Reviewed by:	pjd (ZFS specific review)
Discussed with:	alc
Tested by:	pho
2013-03-09 02:32:23 +00:00
..
cd9660 Complete MPSAFE VFS interface and remove MNTK_MPSAFE flag. 2012-11-09 18:02:25 +00:00
deadfs The deadfs VOPs for vop_ioctl and vop_bmap call itself recursively, 2012-09-13 13:05:45 +00:00
devfs Stop translating the ERESTART error from the open(2) into EINTR. 2013-02-07 14:53:33 +00:00
ext2fs ext2fs: Use prototype declarations for function definitions 2013-02-10 19:49:37 +00:00
fdescfs Merge Capsicum overhaul: 2013-03-02 00:53:12 +00:00
fifofs I am comparing current pipe code with the one in 8.3-STABLE r236165, 2012-07-31 05:48:35 +00:00
fuse Switch the vm_object mutex to be a rwlock. This will enable in the 2013-03-09 02:32:23 +00:00
msdosfs Do not update the fsinfo block on each update of any fat block, this 2013-02-17 20:35:54 +00:00
nandfs Remove the last use of the deprecated MNT_VNODE_FOREACH interface in 2013-01-03 19:01:56 +00:00
nfs Merge Capsicum overhaul: 2013-03-02 00:53:12 +00:00
nfsclient Switch the vm_object mutex to be a rwlock. This will enable in the 2013-03-09 02:32:23 +00:00
nfsserver Switch the vm_object mutex to be a rwlock. This will enable in the 2013-03-09 02:32:23 +00:00
nullfs nullfs: Improve f_flags in statfs(). 2013-03-02 12:42:23 +00:00
nwfs Do not leave invalid pages in the object after the short read for a 2012-08-14 11:45:47 +00:00
procfs Switch the vm_object mutex to be a rwlock. This will enable in the 2013-03-09 02:32:23 +00:00
pseudofs Complete MPSAFE VFS interface and remove MNTK_MPSAFE flag. 2012-11-09 18:02:25 +00:00
smbfs - smbfs_rename() might return an error value without correctly upgrading 2012-11-26 04:29:47 +00:00
tmpfs Switch the vm_object mutex to be a rwlock. This will enable in the 2013-03-09 02:32:23 +00:00
udf Complete MPSAFE VFS interface and remove MNTK_MPSAFE flag. 2012-11-09 18:02:25 +00:00
unionfs r16312 is not any longer real since many years (likely since when VFS 2012-11-19 22:43:45 +00:00