HomeFreeBSD

Reintegrate most of the work done on projects/numa.

Description

Reintegrate most of the work done on projects/numa.

This largely consists of plumbing a domain parameter through various
layers of the VM code. In particular:

  • Domain selection is moved out of the physical memory allocator and into the page allocation routines. The page allocator API is extended to support allocation from a requested domain. The existing API now makes use of per-VM object and per-thread policies to select a domain from which to allocate pages.
  • The reservation allocator now accepts a domain parameter. The global queue of partially populated reservations is split into one queue per domain. This lets us specify a particular domain when attempting to reclaim memory by breaking partially populated reservations.
  • Simiarly, each UMA zone now maintains a bucket cache per domain, rather than a global cache. Each UMA keg now maintains per-domain lists of slabs. A new function, uma_zone_set_domain_selector(), allows one to specify a domain selection policy for allocating slabs. Currently this is used to ensure that per-CPU item buckets are allocated local to the domain corresponding to the CPU.
  • VM object contain a domain selector whose policy is determined by the system default. Currently, when allocating a page with vm_page_alloc(), the object's policy is preferred over the thread's.

This commit does not fully reconcile the work done in r285387 with the
contents of projects/numa. In particular, I implemented vm_page_alloc()
to prefer the object's selection policy over the thread's. Thus,
per-thread and per-process policies specified using numactl are not
always honoured.

Omitted from projects/numa is support for using a bitset to define a
subset of VM domains that may selected by a given policy. It's not yet
clear to me how that should be integrated with r285387.

Some aspects of NUMA-awareness are not yet addressed. For example, we
currently create one page daemon per domain, but the targets used by the
page daemons for reclaiming memory are based on the global free page
count.

Submitted by: attilio, jeff (original version)
Obtained from: projects/numa

Details

Provenance
markjAuthored on
Parents
rS321505: Create a branch for reviving the work done in projects/numa.
Branches
Unknown
Tags
Unknown