kernel - Refactor cpu localization for VM page allocations (2)
authorMatthew Dillon <dillon@apollo.backplane.com>
Sat, 30 Jul 2016 19:30:24 +0000 (12:30 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sat, 30 Jul 2016 20:35:13 +0000 (13:35 -0700)
commit9002b0d5bfaaa14aa7048c4cc55c6bd9a4fa8354
tree5fda70b4379b42a12e5b663c0aa2b983834e04ca
parent8f73b9eea0afc37d3adf87d662ae99210a17f45a
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