git: kernel - Refactor cpu localization for VM page allocations (2)
Matthew Dillon
dillon at crater.dragonflybsd.org
Sat Jul 30 13:40:45 PDT 2016
commit 9002b0d5bfaaa14aa7048c4cc55c6bd9a4fa8354
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date: Sat Jul 30 12:30:24 2016 -0700
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.
Summary of changes:
sys/kern/subr_cpu_topology.c | 27 ++++--
sys/vm/vm_object.c | 10 +--
sys/vm/vm_page.c | 196 ++++++++++++++++++++++++++++---------------
sys/vm/vm_page.h | 27 ++----
sys/vm/vm_zeroidle.c | 40 ++++++---
5 files changed, 185 insertions(+), 115 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/9002b0d5bfaaa14aa7048c4cc55c6bd9a4fa8354
--
DragonFly BSD source repository
More information about the Commits
mailing list