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)
Tue, Nov 12, 11:14 AM
Unknown Object (File)
Sep 20 2024, 4:10 AM
Unknown Object (File)
Sep 11 2024, 5:53 AM
Unknown Object (File)
Sep 10 2024, 7:49 PM
Unknown Object (File)
Sep 8 2024, 6:32 PM
Unknown Object (File)
Sep 8 2024, 7:52 AM
Unknown Object (File)
Sep 7 2024, 1:26 PM
Unknown Object (File)
Sep 7 2024, 9:49 AM
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.