freebsd-dev/sys/compat
Alan Somers d3f96f6610 Fix O(n^2) behavior in sysctl
Sysctl OIDs were internally stored in linked lists, triggering O(n^2)
behavior when userland iterates over many of them.  The slowdown is
noticeable for MIBs that have > 100 children (for example, vm.uma).  But
it's unignorable for kstat.zfs when a pool has > 1000 datasets.

Convert the linked lists into RB trees.  This produces a ~25x speedup
for listing kstat.zfs with 4100 datasets, and no measurable penalty for
small dataset counts.

Bump __FreeBSD_version for the KPI change.

Sponsored by:	Axcient
Reviewed by:	mjg
Differential Revision: https://reviews.freebsd.org/D36500
2022-09-26 18:03:34 -06:00
..
freebsd32 freebsd32: Make sendmsg match native ABI for unpadded final control message 2022-09-15 17:16:22 +01:00
ia32 Retire sv_transtrap 2022-05-20 14:54:03 +03:00
lindebugfs linuxkpi: drm-kmod debugfs support 2022-09-20 19:41:10 +02:00
linprocfs linprocfs: Decode SGX CPU feature in cpuinfo 2022-06-29 10:37:52 +03:00
linsysfs linsysfs: plug set-but-not-used vars. 2022-03-31 23:49:26 +03:00
linux Add getsock 2022-09-10 19:47:47 +00:00
linuxkpi Fix O(n^2) behavior in sysctl 2022-09-26 18:03:34 -06:00
x86bios pmap_unmapdev/bios: Accept a pointer instead of a vm_offset_t. 2022-09-22 15:08:52 -07:00