freebsd-skq/sys/dev/hwpmc
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
..
hwpmc_amd.c hwpmc amd_pcpu_fini: fix a bug in code locked under DEBUG 2012-09-18 13:33:39 +00:00
hwpmc_amd.h
hwpmc_arm.c Remove all the checks on curthread != NULL with the exception of some MD 2012-09-13 22:26:22 +00:00
hwpmc_core.c Update hwpmc to support the Xeon class of Ivybridge processors. 2013-01-31 22:09:53 +00:00
hwpmc_core.h Add Intel Ivy Bridge support to hwpmc(9). 2012-09-06 13:54:01 +00:00
hwpmc_ia64.c
hwpmc_intel.c Update hwpmc to support the Xeon class of Ivybridge processors. 2013-01-31 22:09:53 +00:00
hwpmc_logging.c Add software PMC support. 2012-03-28 20:58:30 +00:00
hwpmc_mips24k.c Rework MIPS PMC code: 2012-03-22 18:01:23 +00:00
hwpmc_mips.c Fix class malloc init for mips and powerpc that was not converted 2012-04-23 08:58:01 +00:00
hwpmc_mod.c Switch the vm_object mutex to be a rwlock. This will enable in the 2013-03-09 02:32:23 +00:00
hwpmc_octeon.c Add Octeon PMC hardware backend 2012-03-23 00:09:27 +00:00
hwpmc_pentium.c
hwpmc_pentium.h
hwpmc_piv.c Add software PMC support. 2012-03-28 20:58:30 +00:00
hwpmc_piv.h
hwpmc_powerpc.c Fix class malloc init for mips and powerpc that was not converted 2012-04-23 08:58:01 +00:00
hwpmc_ppro.c Add software PMC support. 2012-03-28 20:58:30 +00:00
hwpmc_ppro.h
hwpmc_soft.c Add a generic way to call per event allocate / release function. 2013-03-05 10:18:48 +00:00
hwpmc_soft.h Add software PMC support. 2012-03-28 20:58:30 +00:00
hwpmc_sparc64.c
hwpmc_tsc.c Add software PMC support. 2012-03-28 20:58:30 +00:00
hwpmc_tsc.h
hwpmc_uncore.c - Add support for the Intel Sandy Bridge microarchitecture (both core and uncore counting events) 2012-03-01 21:23:26 +00:00
hwpmc_uncore.h - Add support for the Intel Sandy Bridge microarchitecture (both core and uncore counting events) 2012-03-01 21:23:26 +00:00
hwpmc_x86.c Remove all the checks on curthread != NULL with the exception of some MD 2012-09-13 22:26:22 +00:00
hwpmc_xscale.c Add software PMC support. 2012-03-28 20:58:30 +00:00
hwpmc_xscale.h
pmc_events.h Update hwpmc to support the Xeon class of Ivybridge processors. 2013-01-31 22:09:53 +00:00