Page MenuHomeFreeBSD

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

Authored by markj on Jun 19 2020, 3:33 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Sep 11, 4:57 PM
Unknown Object (File)
Fri, Sep 11, 4:54 PM
Unknown Object (File)
Fri, Sep 11, 4:51 PM
Unknown Object (File)
Sun, Sep 6, 2:16 AM
Unknown Object (File)
Sat, Sep 5, 4:34 PM
Unknown Object (File)
Sat, Sep 5, 9:46 AM
Unknown Object (File)
Sat, Sep 5, 8:38 AM
Unknown Object (File)
Thu, Sep 3, 4:17 PM
Subscribers

Details

Summary

Suppose we are running on a CPU in a 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 on a per-CPU cache miss because the empty domain's bucket queue
will always be empty. This means that non-empty domains' 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.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

markj requested review of this revision.Jun 19 2020, 3:33 AM
markj created this revision.
This revision was not accepted when it landed; it landed in state Needs Review.Jun 28 2020, 9:35 PM
This revision was automatically updated to reflect the committed changes.