Introduce stats(3), a flexible statistics gathering API.
This provides a framework for kernel subsystems, such as the IP to define a template describing
a set of "variables of interest" and the intended way for the
stackframework to maintain them (for example the maximum, to define a template describing a set of "variables ofor
interest" (data to feed into the frameworksum, or a t-digest, for example the roundor a combination thereof). Afterwards
trip time value measured on a TCP connection)the user code can feed it the raw data, and the intended wayframework
for the framework to maintains them (for example the maximuminside a user-provided, oropaque statsblobs.
sum, or a histogram, or a combination thereof). Afterwards theIt also provides a way to selectively extract the information
kernel subsystem feeds it the raw data, and the framework maintainsfrom the blobs. The framework can be used both by the
them inside a subsystem-provideduserspace code, opaque statsblobsand in the kernel.
On the userspace side, this provides the mechanism to extract the
statistical information of choice from the blob.
See the stats(3) manual page for details.
This will be used by the upcoming TCP statistics gathering code,
https://reviews.freebsd.org/D20655.
This depends on both https://reviews.freebsd.org/D20324
and https://reviews.freebsd.org/D20116.
It's disabled for now, except for NOTES; it's expected
to be enabled in amd64 GENERIC after a cooldown period.
Sponsored By: Klara Inc, Netflix
Obtained from: Netflix