Page MenuHomeFreeBSD

malloc: retire mt_stats_zone in favor of pcpu_zone_64
ClosedPublic

Authored by mjg on Nov 9 2020, 12:35 AM.
Tags
None
Referenced Files
F140914923: D27142.id79336.diff
Mon, Dec 29, 2:32 PM
Unknown Object (File)
Sun, Dec 28, 6:41 AM
Unknown Object (File)
Fri, Dec 26, 12:42 AM
Unknown Object (File)
Nov 27 2025, 10:46 PM
Unknown Object (File)
Nov 26 2025, 7:34 PM
Unknown Object (File)
Nov 21 2025, 3:59 AM
Unknown Object (File)
Nov 21 2025, 3:58 AM
Unknown Object (File)
Nov 21 2025, 3:58 AM
Subscribers

Details

Summary

The former was only created because the latter did not exist at the time.

Diff Detail

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

Event Timeline

mjg requested review of this revision.Nov 9 2020, 12:35 AM
This revision is now accepted and ready to land.Nov 9 2020, 12:57 AM

Did you consider adding a malloc_pcpu() instead of hard-coding the zone item size?

Yes, along with malloc_type equivalent. Using it here would be a little circular.

malloc_pcpu will possibly be written by me after malloc itself gets cleaned up. for example the zone selection method avoidably encodes size + pointer to a string in the same struct, making it less cache-friendly. once this is sorted out the same (cleaned up) method can be used for malloc_pcpu.

So eventually mti_stats would be allocated using malloc_pcpu()? Ok. BTW, V_pfr_kentry_counter_z consumers would benefit from such a function as well. Right now it's a per-VNET zone but I think there's no good reason for that.

This revision was automatically updated to reflect the committed changes.