freebsd-nq/sys/cddl/compat/opensolaris/kern
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
..
opensolaris_acl.c Don't panic when we read an empty ACL from ZFS. Apparently this may happen 2010-11-30 21:04:05 +00:00
opensolaris_atomic.c Finally... Import the latest open-source ZFS version - (SPA) 28. 2011-02-27 19:41:40 +00:00
opensolaris_cmn_err.c opensolaris compat: terminate cmn_err mesages with a new line 2012-11-24 13:10:36 +00:00
opensolaris_kmem.c Finally... Import the latest open-source ZFS version - (SPA) 28. 2011-02-27 19:41:40 +00:00
opensolaris_kobj.c Remove the support for using non-mpsafe filesystem modules. 2012-10-22 17:50:54 +00:00
opensolaris_kstat.c Renamed zfs trim stats removing duplicate zio_trim identifier from the name 2012-12-12 16:14:14 +00:00
opensolaris_lookup.c opensolaris_lookup: use vfs_busy in traverse before calling VFS_ROOT 2012-11-04 14:16:18 +00:00
opensolaris_misc.c Finally... Import the latest open-source ZFS version - (SPA) 28. 2011-02-27 19:41:40 +00:00
opensolaris_policy.c Finally... Import the latest open-source ZFS version - (SPA) 28. 2011-02-27 19:41:40 +00:00
opensolaris_string.c Finally... Import the latest open-source ZFS version - (SPA) 28. 2011-02-27 19:41:40 +00:00
opensolaris_sunddi.c Use proper lock in assertion. 2011-02-28 05:45:31 +00:00
opensolaris_sysevent.c Silence warnings about unsupoorted value types. 2011-05-27 08:34:31 +00:00
opensolaris_taskq.c Don't access task structure once we call task function. 2011-05-24 20:07:15 +00:00
opensolaris_uio.c Merge ZFS version 15 and almost all OpenSolaris bugfixes referenced 2010-07-12 23:49:04 +00:00
opensolaris_vfs.c opensolaris compat: clear VI_MOUNT before returning if mount_snapshot fails 2012-11-04 14:27:31 +00:00
opensolaris_vm.c Switch the vm_object mutex to be a rwlock. This will enable in the 2013-03-09 02:32:23 +00:00
opensolaris_zone.c Finally... Import the latest open-source ZFS version - (SPA) 28. 2011-02-27 19:41:40 +00:00
opensolaris.c opensolaris compat / zfs: avoid early overflow in ddi_get_lbolt* 2011-06-04 07:02:06 +00:00