path: root/sys/sys/arb.h
Commit message (Collapse)AuthorAgeFilesLines
* Add copyrights that I forgot to add when splitting arb.h off from tree.h.Edward Tomasz Napierala2019-10-151-4/+3
| | | | | | | | | | | While here clean up the RCS tags. Suggested by: lstewart MFC after: 2 weeks Sponsored by: Klara Inc, Netflix Notes: svn path=/head/; revision=353588
* Introduce stats(3), a flexible statistics gathering API.Edward Tomasz Napierala2019-10-071-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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, sum, t-digest, or a combination thereof). Afterwards the user code feeds in the raw data, and the framework maintains these variables inside a user-provided, opaque stats blobs. The framework also provides a way to selectively extract the stats from the blobs. The stats(3) framework can be used in both userspace and the kernel. See the stats(3) manual page for details. This will be used by the upcoming TCP statistics gathering code, https://reviews.freebsd.org/D20655. The stats(3) framework is disabled by default for now, except in the NOTES kernel (for QA); it is expected to be enabled in amd64 GENERIC after a cool down period. Reviewed by: sef (earlier version) Obtained from: Netflix Relnotes: yes Sponsored by: Klara Inc, Netflix Differential Revision: https://reviews.freebsd.org/D20477 Notes: svn path=/head/; revision=353283
* Rename ARB_REBALANCE(3) to ARB_REINSERT(3) to match tree(3),Edward Tomasz Napierala2019-09-281-7/+7
| | | | | | | | | | and document it. MFC after: 2 weeks Sponsored by: Klara Inc, Netflix Notes: svn path=/head/; revision=352839
* Introduce arb(3), the Array-based Red-Black Tree macros: similarEdward Tomasz Napierala2019-09-141-0/+779
to the traditional tree(3) RB trees, but using an array (preallocated, linear chunk of memory) to store the tree. This avoids allocation overhead, improves memory locality, and makes it trivially easy to share/transfer/copy the entire tree without the need for marshalling. The downside is that the size is fixed at initialization time; there is no mechanism to resize it. This is one of the dependencies for the new stats(3) framework (https://reviews.freebsd.org/D20477). Reviewed by: bcr (man pages), markj Discussed with: cem MFC after: 2 weeks Sponsored by: Klara Inc, Netflix Obtained from: Netflix Differential Revision: https://reviews.freebsd.org/D20324 Notes: svn path=/head/; revision=352337