freebsd-skq/sys/vm
das 2beb616ced Close a race in swapoff(). Here are the gory details:
In order to avoid livelock, swapoff() skips over objects with a
  nonzero pip count and makes another pass if necessary.  Since it is
  impossible to know which objects we care about, it would choose an
  arbitrary object with a nonzero pip count and wait for it before
  making another pass, the theory being that this object would finish
  paging about as quickly as the ones we care about.  Unfortunately,
  we may have slept since we acquired a reference to this object.
  Hack around this problem by tsleep()ing on the pointer anyway, but
  timeout after a fixed interval.  More elegant solutions are possible,
  but the ones I considered unnecessarily complicate this rare case.

Also, kill some nits that seem to have crept into the swapoff() code
in the last 75 revisions or so:

- Don't pass both sp and sp->sw_used to swap_pager_swapoff(), since
  the latter can be derived from the former.

- Replace swp_pager_find_dev() with something simpler.  There's no
  need to iterate over the entire list of swap devices just to determine
  if a given block is assigned to the one we're interested in.

- Expand the scope of the swhash_mtx in a couple of places so that it
  isn't released and reacquired once for every hash bucket.

- Don't drop the swhash_mtx while holding a reference to an object.
  We need to lock the object first.  Unfortunately, doing so would
  violate the established lock order, so use VM_OBJECT_TRYLOCK() and
  try again on a subsequent pass if the object is already locked.

- Refactor swp_pager_force_pagein() and swap_pager_swapoff() a bit.
2004-11-05 05:36:56 +00:00
..
default_pager.c Access the swap_pagers' ->putpages() through swappagerops instead 2003-08-06 12:05:48 +00:00
device_pager.c Use dev_re[fl]thread() to maintain a ref on the device driver while 2004-09-24 05:59:11 +00:00
phys_pager.c Zero the physical page only if it is invalid and not prezeroed. 2004-04-25 07:58:59 +00:00
pmap.h - pmap_kenter_temporary() is unused by machine-independent code. Therefore, 2004-04-10 22:41:46 +00:00
swap_pager.c Close a race in swapoff(). Here are the gory details: 2004-11-05 05:36:56 +00:00
swap_pager.h Remove advertising clause from University of California Regent's license, 2004-04-06 20:15:37 +00:00
uma_core.c Fix a INVARIANTS-only bug introduced in Revision 1.104: 2004-10-27 21:19:35 +00:00
uma_dbg.c Fix critical stability problems that can cause UMA mbuf cluster 2004-10-08 20:19:29 +00:00
uma_dbg.h * Add a "how" argument to uma_zone constructors and initialization functions 2004-08-02 00:18:36 +00:00
uma_int.h Rework the way slab header storage space is calculated in UMA. 2004-07-29 15:25:40 +00:00
uma.h * Add a "how" argument to uma_zone constructors and initialization functions 2004-08-02 00:18:36 +00:00
vm_contig.c The synchronization provided by vm object locking has eliminated the 2004-11-03 20:17:31 +00:00
vm_extern.h For years, kmem_alloc_pageable() has been misused. Now that the last of 2004-07-25 20:08:59 +00:00
vm_fault.c Remove unnecessary check for curthread == NULL. 2004-10-17 20:29:28 +00:00
vm_glue.c The synchronization provided by vm object locking has eliminated the 2004-11-03 20:17:31 +00:00
vm_init.c Remove dead code. A vm_map's first_free is never NULL (even if the map is 2004-08-07 05:58:31 +00:00
vm_kern.c Use VM_ALLOC_NOBUSY instead of calling vm_page_wakeup(). 2004-10-24 18:46:32 +00:00
vm_kern.h Remove advertising clause from University of California Regent's license, 2004-04-06 20:15:37 +00:00
vm_map.c Push Giant deep into vm_forkproc(), acquiring it only if the process has 2004-09-03 05:11:32 +00:00
vm_map.h Replace the linear search in vm_map_findspace() with an O(log n) 2004-08-13 08:06:34 +00:00
vm_meter.c Put on my peril sensitive sunglasses and add a flags field to the internal 2004-10-11 22:04:16 +00:00
vm_mmap.c Don't clear flags we just checked were not set. 2004-10-26 05:57:29 +00:00
vm_object.c The synchronization provided by vm object locking has eliminated the 2004-11-03 20:17:31 +00:00
vm_object.h Make the code and comments for vm_object_coalesce() consistent. 2004-07-25 07:48:47 +00:00
vm_page.c The synchronization provided by vm object locking has eliminated the 2004-11-03 20:17:31 +00:00
vm_page.h Introduce VM_ALLOC_NOBUSY, an option to vm_page_alloc() and vm_page_grab() 2004-10-24 06:15:36 +00:00
vm_pageout.c The synchronization provided by vm object locking has eliminated the 2004-11-03 20:17:31 +00:00
vm_pageout.h Remove advertising clause from University of California Regent's license, 2004-04-06 20:15:37 +00:00
vm_pageq.c Remove references to L1 in the comments, according to Alan they are 2004-06-07 19:33:05 +00:00
vm_pager.c Retire b_magic now, we have the bufobj containing the same hint. 2004-11-04 09:48:18 +00:00
vm_pager.h The demise of vm_pager_map_page() in revision 1.93 of vm/vm_pager.c permits 2004-04-08 19:08:49 +00:00
vm_param.h Second half of the dev_t cleanup. 2004-06-17 17:16:53 +00:00
vm_unix.c Remove advertising clause from University of California Regent's license, 2004-04-06 20:15:37 +00:00
vm_zeroidle.c Introduce a Boolean variable wakeup_needed to avoid repeated, unnecessary 2004-10-31 19:32:57 +00:00
vm.h - Introduce and use a new tunable "debug.mpsafevm". At present, setting 2004-08-16 06:16:12 +00:00
vnode_pager.c Also check that the sectormask is bigger than zero. 2004-10-26 19:51:57 +00:00
vnode_pager.h Remove advertising clause from University of California Regent's license, 2004-04-06 20:15:37 +00:00