freebsd-dev/sys/dev/drm2
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
..
i915 Switch the vm_object mutex to be a rwlock. This will enable in the 2013-03-09 02:32:23 +00:00
ttm Switch the vm_object mutex to be a rwlock. This will enable in the 2013-03-09 02:32:23 +00:00
drm_agpsupport.c
drm_atomic.h
drm_auth.c
drm_bufs.c
drm_context.c
drm_crtc_helper.c
drm_crtc_helper.h
drm_crtc.c
drm_crtc.h
drm_dma.c
drm_dp_helper.h
drm_dp_iic_helper.c
drm_drawable.c
drm_drv.c Import the preliminary port of the TTM. 2013-03-05 09:49:34 +00:00
drm_edid_modes.h
drm_edid.c
drm_edid.h
drm_fb_helper.c Import Linux commit a1b7736dac5f2d5876e68c47a0fce3f423840070 2013-03-08 18:15:07 +00:00
drm_fb_helper.h
drm_fops.c Streamline use of cdevpriv and correct some corner cases. 2012-08-15 16:19:39 +00:00
drm_fourcc.h
drm_gem_names.c
drm_gem_names.h
drm_gem.c Import the preliminary port of the TTM. 2013-03-05 09:49:34 +00:00
drm_global.c drm: Fix a call to free(9) with an incorrect malloc type 2013-03-08 18:11:02 +00:00
drm_global.h Import the drm_global references helpers. 2013-03-05 09:27:21 +00:00
drm_hashtab.c
drm_hashtab.h
drm_internal.h
drm_ioc32.c Add drm and i915 ioctl translations for 32 bit process on 64 bit host. 2012-08-18 18:26:25 +00:00
drm_ioctl.c
drm_irq.c
drm_linux_list_sort.c
drm_linux_list.h
drm_lock.c
drm_memory.c
drm_mm.c Import the drm_mm_debug_table() function. 2013-03-05 09:07:58 +00:00
drm_mm.h Import the drm_mm_debug_table() function. 2013-03-05 09:07:58 +00:00
drm_mode.h
drm_modes.c
drm_pci.c
drm_pciids.h Add PCI IDs for Ivy Bridge 2012-06-21 22:06:57 +00:00
drm_sarea.h
drm_scatter.c
drm_sman.c
drm_sman.h
drm_stub.c
drm_sysctl.c
drm_vm.c
drm.h
drmP.h Switch the vm_object mutex to be a rwlock. This will enable in the 2013-03-09 02:32:23 +00:00