Page MenuHomeFreeBSD

dtrace: Avoid excessive pcpu allocations
ClosedPublic

Authored by markj on Nov 18 2024, 11:17 PM.
Tags
None
Referenced Files
F142282933: D47667.id.diff
Sun, Jan 18, 3:54 AM
F142263879: D47667.id146660.diff
Sat, Jan 17, 11:00 PM
Unknown Object (File)
Sun, Jan 4, 2:27 AM
Unknown Object (File)
Nov 26 2025, 10:23 AM
Unknown Object (File)
Nov 11 2025, 5:22 PM
Unknown Object (File)
Nov 8 2025, 2:49 AM
Unknown Object (File)
Nov 4 2025, 3:39 PM
Unknown Object (File)
Oct 27 2025, 1:09 AM
Subscribers

Details

Summary

We were previously allocating MAXCPU structures for several purposes,
but this is generally unnecessary and is quite excessive. We already
are careful to allocate only as many per-CPU tracing buffers as needed;
extend this to other allocations.

For example, in a 2-vCPU VM, the size of a consumer state structure
drops from 64KB to 128B. The size of the per-consumer dts_buffer and
dts_aggbuffer arrays shrink similarly.

No functional change intended.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable