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, Mar 29, 5:46 AM
Unknown Object (File)
Wed, Mar 27, 10:57 PM
Unknown Object (File)
Sep 18 2023, 12:45 PM
Unknown Object (File)
Sep 18 2023, 5:14 AM
Unknown Object (File)
Sep 18 2023, 5:13 AM
Unknown Object (File)
Sep 18 2023, 5:11 AM
Unknown Object (File)
Sep 3 2023, 12:35 AM
Unknown Object (File)
Jun 16 2023, 3:30 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.