kernel - Refactor cpu localization for VM page allocations (2)
commitcede4056848b741110ec3f00a73c7b194e7869e0
authorMatthew Dillon <dillon@apollo.backplane.com>
Sat, 30 Jul 2016 19:30:24 +0000 (30 12:30 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sun, 31 Jul 2016 07:01:23 +0000 (31 00:01 -0700)
tree7a55d29f6c1027374372304646e1866107321cf7
parentef7b3880bb022bd1f61f738a26ba8d397a5a673c
kernel - Refactor cpu localization for VM page allocations (2)

* Finish up the refactoring.  Localize backoffs for search failures
  by doing a masked domain search.  This avoids bleeding into non-local
  page queues until we've completely exhausted our local queues,
  regardess of the starting pg_color index.

* We try to maintain 16-way set associativity for VM page allocations
  even if the topology does not allow us to do it perfect.  So, for
  example, a 4-socket x 12-core (48-core) opteron can break the 256
  queues into 4 x 64 queues, then split the 12-cores per socket into
  sets of 3 giving 16 queues (the minimum) to each set of 3 cores.

* Refactor the page-zeroing code to only check the localized area.
  This fixes a number of issues related to the zerod pages in the
  queues winding up severely unbalanced.  Other cpus in the local
  group can help replentish a particular cpu's pre-zerod pages but
  we intentionally allow a heavy user to exhaust the pages.

* Adjust the cpu topology code to normalize the physical package id.
  Some machines start at 1, some machines start at 0.  Normalize
  everything to start at 0.
sys/kern/subr_cpu_topology.c
sys/vm/vm_object.c
sys/vm/vm_page.c
sys/vm/vm_page.h
sys/vm/vm_zeroidle.c