HomeFreeBSD

dtrace: add a knob to control maximum size of principal buffers

Description

dtrace: add a knob to control maximum size of principal buffers

We had a hardcoded limit of 1/128-th of physical memory that was further
subdivided between all CPUs as principal buffers are allocated on the
per-CPU basis. Actually, the buffers could use up 1/64-th of the
memmory because with the default switch policy there are two buffers per
CPU.

This commit allows to change that limit.

Note that the discussed limit is per dtrace command invocation.
The idea is to limit the size of a single malloc(9) call, not the total
memory size used by DTrace buffers.

Reviewed by: markj
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D33648

Details

Provenance
avgAuthored on Jan 11 2022, 1:44 PM
Reviewer
markj
Differential Revision
D33648: dtrace: add a knob to control maximum size of principal buffers
Parents
rG256c8c5df2a4: dt_unring_buf: set dtbd_oldest to the start of the first record
Branches
Unknown
Tags
Unknown