Page MenuHomeFreeBSD

uma: Make uma_zone_set_maxcache() more fine-grained
ClosedPublic

Authored by markj on Nov 10 2020, 10:28 PM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 22 2023, 10:27 PM
Unknown Object (File)
Oct 12 2023, 12:54 AM
Unknown Object (File)
Sep 30 2023, 7:08 PM
Unknown Object (File)
Jul 8 2023, 7:35 AM
Unknown Object (File)
Jul 8 2023, 7:35 AM
Unknown Object (File)
Jul 8 2023, 7:34 AM
Unknown Object (File)
Jul 8 2023, 7:23 AM
Unknown Object (File)
Jul 6 2023, 10:15 AM
Subscribers

Details

Summary

The old implementation chose the largest bucket zone such that if the
per-CPU caches are fully populated, the total number of items cached is
no larger than the specified limit. If no such zone existed, UMA would
not do any caching.

With the parent revision, we can now use uz_bucket_size_max to set a
limit, giving more precise control. This fixes a problem with the
kstack_cache zone: the limit of 4 * mp_ncpus items meant that the zone
would not do *any* caching. That's because the smallest bucket size
holds 2 items and we may cache up to 3 full buckets per CPU, and
2 * 3 * mp_ncpus > 4 * mp_ncpus.

Diff Detail

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

Event Timeline

markj created this revision.
This revision was not accepted when it landed; it landed in state Needs Review.Dec 6 2020, 10:46 PM
This revision was automatically updated to reflect the committed changes.