HomeFreeBSD

Fix UMA's first-touch policy on systems with empty domains.

Description

Fix UMA's first-touch policy on systems with empty domains.

Suppose a thread is running on a CPU in a NUMA domain with no physical
RAM. When an item is freed to a first-touch zone, it ends up in the
cross-domain bucket. When the bucket is full, it gets placed in another
domain's bucket queue. However, when allocating an item, UMA will
always go to the keg upon a per-CPU cache miss because the empty
domain's bucket queue will always be empty. This means that a non-empty
domain's bucket queues can grow very rapidly on such systems. For
example, it can easily cause mbuf allocation failures when the zone
limit is reached.

Change cache_alloc() to follow a round-robin policy when running on an
empty domain.

Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D25355

Details

Provenance
markjAuthored on
Differential Revision
D25355: Fix UMA's first-touch policy with empty domains.
Parents
rS362739: Remove some redundant assignments and computations.
Branches
Unknown
Tags
Unknown