kernel - Use different cache_rover for emergency pager
authorMatthew Dillon <dillon@apollo.backplane.com>
Sun, 22 Oct 2017 06:17:26 +0000 (23:17 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sun, 22 Oct 2017 06:23:59 +0000 (23:23 -0700)
commitcf2880a210f08c9d519d06c9161d7fd9af4a4085
tree75a679e82f39b754287efabc60413bdb70380347
parent1fe2604d6db93c58927d9f3b4b30f445cd2523c6
kernel - Use different cache_rover for emergency pager

* Fix an issue where the same cache_rover index was being used for both
  pageout threads.  This could result in a great deal of contention
  and cache line bouncing between the threads due to the vm pagerq
  spinlock.

* Fix by changing cache_rover to an array[2].  In addition, the
  one pageout thread iterates its rover forwards while the other
  runs its rover backwards, plus a little more code, to minimize
  conflicts.
sys/vm/vm_pageout.c