kernel - Add vmobj_token, misc vm-related tokenization
authorMatthew Dillon <dillon@apollo.backplane.com>
Sat, 28 Aug 2010 17:26:04 +0000 (10:26 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sat, 28 Aug 2010 17:26:04 +0000 (10:26 -0700)
commit2de4f77e2b4ab23695f2ed9e2917345bc821b229
tree964f82c9241b6cee82237f84e99ec25fa9924153
parent304d60e8383b8c29ca01daedd3d21169d4347997
kernel - Add vmobj_token, misc vm-related tokenization

* Add vmobj_token to protect vm_object_list and vm_object->ref_count and
  related functions.

  Note: coalesce and collapse require both vm_token and vmobj_token,
  and vmspace_fork() requires a bunch of tokens.

* Remove miscellanious mplocks and critical sections that are no longer
  needed.

* Correct potential sysinfo kernel data visibilty issue.

* Optimize some potentially recursive vm_token/vmobj_token situations
  by adding *_locked() procedure variants.  To avoid blowing out the
  token stack.

* Remove unnecessary get_mplock() calls in vm_zone.c

* Bump gd_intr_nesting_level in the IPI processing core and assert
  that it is zero in the gettoken core.  Hard interrupts (vs interrupt
  threads) are not allowed to acquire tokens for obvious reasons.
18 files changed:
sys/cpu/i386/misc/lwbuf.c
sys/dev/virtual/net/if_vke.c
sys/emulation/linux/i386/linprocfs/linprocfs_misc.c
sys/emulation/linux/linux_misc.c
sys/kern/kern_slaballoc.c
sys/kern/lwkt_ipiq.c
sys/kern/lwkt_token.c
sys/kern/vfs_subr.c
sys/sys/thread.h
sys/vm/vm_kern.c
sys/vm/vm_map.c
sys/vm/vm_meter.c
sys/vm/vm_object.c
sys/vm/vm_object.h
sys/vm/vm_swapcache.c
sys/vm/vm_zeroidle.c
sys/vm/vm_zone.c
sys/vm/vnode_pager.c