freebsd-dev/sys/vm
John Baldwin 8e6fa660f2 Fix some locking nits with the p_state field of struct proc:
- Hold the proc lock while changing the state from PRS_NEW to PRS_NORMAL
  in fork to honor the locking requirements.  While here, expand the scope
  of the PROC_LOCK() on the new process (p2) to avoid some LORs.  Previously
  the code was locking the new child process (p2) after it had locked the
  parent process (p1).  However, when locking two processes, the safe order
  is to lock the child first, then the parent.
- Fix various places that were checking p_state against PRS_NEW without
  having the process locked to use PROC_LOCK().  Every place was already
  locking the process, just after the PRS_NEW check.
- Remove or reduce the use of PROC_SLOCK() for places that were checking
  p_state against PRS_NEW.  The PROC_LOCK() alone is sufficient for reading
  the current state.
- Reorder fill_kinfo_proc() slightly so it only acquires PROC_SLOCK() once.

MFC after:	1 week
2011-03-24 18:40:11 +00:00
..
default_pager.c
device_pager.c Eliminate duplication of the fake page code and zone by the device and sg 2011-03-11 07:07:48 +00:00
memguard.c
memguard.h
phys_pager.c
pmap.h
redzone.c
redzone.h
sg_pager.c Eliminate duplication of the fake page code and zone by the device and sg 2011-03-11 07:07:48 +00:00
swap_pager.c Change the return type of vmspace_swap_count to a long to match the other 2011-03-01 11:04:30 +00:00
swap_pager.h
uma_core.c - Merge changes to the base system to support OFED. These include 2011-03-21 09:40:01 +00:00
uma_dbg.c
uma_dbg.h
uma_int.h
uma.h
vm_contig.c
vm_extern.h
vm_fault.c
vm_glue.c
vm_init.c
vm_kern.c
vm_kern.h
vm_map.c - Merge changes to the base system to support OFED. These include 2011-03-21 09:40:01 +00:00
vm_map.h - Merge changes to the base system to support OFED. These include 2011-03-21 09:40:01 +00:00
vm_meter.c Fix some locking nits with the p_state field of struct proc: 2011-03-24 18:40:11 +00:00
vm_mmap.c
vm_object.c
vm_object.h
vm_page.c Eliminate duplication of the fake page code and zone by the device and sg 2011-03-11 07:07:48 +00:00
vm_page.h Eliminate duplication of the fake page code and zone by the device and sg 2011-03-11 07:07:48 +00:00
vm_pageout.c Fix some locking nits with the p_state field of struct proc: 2011-03-24 18:40:11 +00:00
vm_pageout.h
vm_pager.c
vm_pager.h
vm_param.h
vm_phys.c
vm_phys.h
vm_reserv.c
vm_reserv.h
vm_unix.c
vm_zeroidle.c
vm.h
vnode_pager.c
vnode_pager.h