Page MenuHomeFreeBSD

Remove free_domain() and uma_zfree_domain().
ClosedPublic

Authored by markj on Aug 4 2020, 12:29 AM.
Tags
None
Referenced Files
F132749588: D25937.id75336.diff
Sun, Oct 19, 3:09 PM
F132749581: D25937.id78039.diff
Sun, Oct 19, 3:09 PM
F132749579: D25937.id.diff
Sun, Oct 19, 3:08 PM
F132681926: D25937.diff
Sun, Oct 19, 12:32 AM
Unknown Object (File)
Mon, Sep 29, 6:44 PM
Unknown Object (File)
Aug 6 2025, 9:43 PM
Unknown Object (File)
Aug 6 2025, 1:36 PM
Unknown Object (File)
Aug 5 2025, 12:21 PM

Details

Summary

They were introduced before UMA gained support for cross-domain frees.
Before that point, uma_zfree() would place the item in a per-CPU
bucket in the common case, so over time the per-CPU caches could become
polluted with items from remote domains if cross-domain frees were
common. free_domain() was intended to avoid polluting the caches in
cases where an expensive free() operation was permissible.

Now UMA handles cross-domain frees automatically for zones that follow
the (default) first-touch policy, which includes malloc(9) zones. The
the above-mentioned pollution is handled with an extra caching layer.
This makes free_domain() redundant. To simplify our allocator
interfaces, I propose removing it and uma_zfree_domain(). The latter is
only used to implement free_domain().

Diff Detail

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