Page MenuHomeFreeBSD

Fix checks in the bucket allocation path.
AbandonedPublic

Authored by markj on Oct 31 2018, 10:13 PM.
Tags
None
Referenced Files
Unknown Object (File)
Nov 20 2024, 9:43 PM
Unknown Object (File)
Oct 2 2024, 11:33 PM
Unknown Object (File)
Sep 30 2024, 7:19 PM
Unknown Object (File)
Sep 30 2024, 10:01 AM
Unknown Object (File)
Sep 19 2024, 4:01 PM
Unknown Object (File)
Sep 5 2024, 9:00 PM
Unknown Object (File)
Sep 2 2024, 1:47 AM
Unknown Object (File)
Aug 20 2024, 10:21 PM
Subscribers
None

Details

Summary

For UMA_ZONE_NUMA zones, we only install a newly allocated bucket in the
pcpu cache if we're still running within the selected domain after the
bucket allocation. However, if the selected domain was empty, we set
domain = UMA_ANYDOMAIN, so the test domain == PCPU_GET(domain) is always
false and we end up caching the bucket in one of the per-domain lists.

Fix the problem by testing domain == UMA_ANYDOMAIN instead of checking
for UMA_ZONE_NUMA. As pointed out in D16666, this is clearer and saves
an extra memory reference in common cases. After r339043, this change
also ensures that we maintain pcpu caches for CPUs belonging to extra
domains when UMA_ZONE_NUMA is set. Presently, the only zones with this
attribute are the bucket zones themselves.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 20546
Build 19971: arc lint + arc unit

Event Timeline

markj added inline comments.
sys/vm/uma_core.c
3187

Hmm, this is kind of odd. We always add full buckets to domain 0's bucket list for first-touch zones.