HomeFreeBSD

Fix some problems that manifest when NUMA domain 0 is empty.

Description

Fix some problems that manifest when NUMA domain 0 is empty.

  • In uma_prealloc(), we need to check for an empty domain before the first allocation attempt, not after. Fix this by switching uma_prealloc() to use a vm_domainset iterator, which addresses the secondary issue of using a signed domain identifier in round-robin iteration.
  • Don't automatically create a page daemon for domain 0.
  • In domainset_empty_vm(), recompute ds_cnt and ds_order after excluding empty domains; otherwise we may frequently specify an empty domain when calling in to the page allocator, wasting CPU time. Convert DOMAINSET_PREF() policies for empty domains to round-robin.
  • When freeing bootstrap pages, don't count them towards the per-domain total page counts for now: some vm_phys segments are created before the SRAT is parsed and are thus always identified as being in domain 0 even when they are not. Then, when bootstrap pages are freed, they are added to a domain that we had previously thought was empty. Until this is corrected, we simply exclude them from the per-domain page count.

Reported and tested by: Rajesh Kumar <rajfbsd@gmail.com>
Reviewed by: gallatin
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D17704

Details

Provenance
markjAuthored on
Reviewer
gallatin
Differential Revision
D17704: Handle an empty NUMA domain 0.
Parents
rS339924: Implement the dump_stack() function in the LinuxKPI.
Branches
Unknown
Tags
Unknown