Page MenuHomeFreeBSD

dtrace: Avoid excessive pcpu allocations
ClosedPublic

Authored by markj on Nov 18 2024, 11:17 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Mar 23, 6:33 AM
Unknown Object (File)
Sun, Mar 22, 6:45 AM
Unknown Object (File)
Fri, Mar 20, 2:55 AM
Unknown Object (File)
Wed, Mar 18, 5:48 PM
Unknown Object (File)
Feb 7 2026, 11:33 PM
Unknown Object (File)
Feb 7 2026, 4:32 PM
Unknown Object (File)
Jan 31 2026, 2:14 PM
Unknown Object (File)
Jan 18 2026, 3:54 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