Introduce stats(3), a flexible statistics gathering API.
This provides a framework to define a template describing
a set of "variables of interest" and the intended way for the
framework to maintain them (for example the maximum, or
sum, or a t-digest, or a combination thereof). Afterwards
the user code can feed it the raw data, and the framework
maintains them inside a user-provided, opaque statsblobs.
It also provides a way to selectively extract the information
from the blobs. The framework can be used both by the
userspace code, and in the kernel.
See the stats(3) manual page for details.
This will be used by the upcoming TCP statistics gathering code,
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