kernel - Fix MP race in vmspace_president_count()
authorMatthew Dillon <dillon@apollo.backplane.com>
Fri, 25 Mar 2011 06:25:05 +0000 (23:25 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Fri, 25 Mar 2011 06:25:05 +0000 (23:25 -0700)
commit87882e126b762d0175ced26c8e2337af315e510a
tree9d5289e96e6a27575f4372a02569c685b81a4ea2
parent8faaca42a0994fda168c98abf14bb204c3cd2935
kernel - Fix MP race in vmspace_president_count()

* We must get at least a shared vm_map lock in order to scan the
  vm_map_entry list.

* Cache the totaled value and use it for repeated requests within one
  second or if the vm_map lock could not be acquired non-blocking.

* The bug being fixed could be triggered by top.
sys/vm/vm_map.h