kernel - Fix panic in zget() during heavy paging
authorMatthew Dillon <dillon@apollo.backplane.com>
Thu, 23 Mar 2017 01:43:08 +0000 (18:43 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Thu, 23 Mar 2017 01:43:08 +0000 (18:43 -0700)
commite16c650d787872d60f6ca3d20a7f1bc1e0c19261
treefb9c83366409cf1b14bc4161ad508b06504237e0
parentdd8f8e174ebecf179f46197925501a4b690f6282
kernel - Fix panic in zget() during heavy paging

* Fix a panic that can occur in zget() when a large number of swap info
  blocks are needed from the swap_zone.

  Fix by reformulation how new items are added to the zone.  This is a
  non-critical code path, but we make it a bit more SMP friendly anyway.

* Use the opportunity to get rid of the VM object ZONE_INTERRUPT uses.
  The two that are left are never destroyed, so there's no need to track
  the pages in an object.

Reported-by: tkusumi
sys/platform/pc64/x86_64/pmap.c
sys/platform/vkernel64/platform/pmap.c
sys/vm/vm_map.c
sys/vm/vm_zone.c
sys/vm/vm_zone.h