opnsense-src/sys
Alan Somers 2d1c164591 Speed up geom_stats_resync in the presence of many devices
The old code had a O(n) loop, where n is the size of /dev/devstat.
Multiply that by another O(n) loop in devstat_mmap for a total of
O(n^2).

This change adds DIOCGMEDIASIZE support to /dev/devstat so userland can
quickly determine the right amount of memory to map, eliminating the
O(n) loop in userland.

This change decreases the time to run "gstat -bI0.001" with 16,384 md
devices from 29.7s to 4.2s.

Also, fix a memory leak first reported as PR 203097.

Sponsored by:	Axcient
Reviewed by:	mav, imp
Differential Revision:	https://reviews.freebsd.org/D28968

(cherry picked from commit ab63da3564)
2021-03-21 02:23:42 +00:00
..
amd64 Rename _cscan_atomic.h and _cscan_bus.h to atomic_san.h and bus_san.h 2021-03-15 11:39:11 -04:00
arm arm64: Add support for bcm2838 RNG 2021-03-20 11:12:13 +01:00
arm64 sys/arm64/arm64/vfp.c: Fix -Wunused and -Wpointer-sign warnings 2021-03-17 09:51:39 +00:00
bsm Add aio_writev and aio_readv 2021-01-02 19:57:58 -07:00
cam Optimize out few extra memory accesses. 2021-03-14 22:35:28 -04:00
cddl Reimplemen FreeBSD/arm64 dtrace_gethrtime() to use the system timer. 2021-02-25 21:38:30 +00:00
compat linux: make timerfd_settime(2) set expirations count to zero 2021-03-19 21:36:11 +03:00
conf kern.mk: Fix wrong variable being used for linker path after 172a624f0 2021-03-17 09:51:40 +00:00
contrib zfs: bring back possibility to rewind the checkpoint from 2021-03-18 22:10:59 +01:00
crypto armv8crypto: fix AES-XTS regression introduced by ed9b7f44 2021-03-07 12:41:15 -08:00
ddb ddb: add ability to print user registers 2021-01-08 14:53:06 -04:00
dev vtnet: fix TSO for TCP/IPv6 2021-03-18 21:33:32 +01:00
dts Switch to the new device-tree vendor tree 2021-01-15 20:08:39 +01:00
fs fusefs: set d_off during VOP_READDIR 2021-03-21 02:00:33 +00:00
gdb gdb(4): allow bulk write of registers 2020-12-23 14:37:05 -04:00
geom gmirror: Pre-allocate the timeout event structure 2021-03-17 21:24:20 -04:00
gnu Remove the old dts imported tree. 2021-01-15 20:09:55 +01:00
i386 i386: Fix a few typos 2021-03-20 11:10:35 +01:00
isa Move back the isa non-PNP driver deadline to FreeBSD 14. 2021-03-08 16:02:44 -07:00
kern Speed up geom_stats_resync in the presence of many devices 2021-03-21 02:23:42 +00:00
kgssapi State kgssapi dependency on xdr. 2020-09-17 22:29:38 +00:00
libkern Revert "Reimplement strlen" 2021-02-03 19:39:49 +00:00
mips MFC: mips: fix early kernel panic when setting up interrupt counters 2021-02-02 21:06:37 -08:00
modules base: remove if_wg(4) and associated utilities, manpage 2021-03-18 07:07:56 +00:00
net pf: Fully remove interrupt events on vnet cleanup 2021-03-19 23:41:27 +01:00
net80211 net80211: Fix a typo in a comment 2021-03-20 11:13:31 +01:00
netgraph netgraph/ng_car: Add color marking code 2021-02-26 13:29:39 +01:00
netinet Fix a few typos in comments 2021-03-20 11:13:01 +01:00
netinet6 Flush remaining routes from the routing table during VNET shutdown. 2021-03-13 20:19:17 +00:00
netipsec Convert unmapped mbufs before computing checksums in IPsec. 2021-01-19 11:52:00 -08:00
netpfil Fix a few typos in comments 2021-03-20 11:13:01 +01:00
netsmb
nfs
nfsclient
nfsserver nfs: Mark unused statistics variable as reserved 2020-11-18 04:35:49 +00:00
nlm nlm: clean up empty lines in .c and .h files 2020-09-01 22:14:52 +00:00
ofed 504ebd612e: kern: sonewconn: set so_options before pru_attach() 2021-02-23 22:48:42 -06:00
opencrypto opencrypto: Make cryptosoft attach silently 2021-03-12 12:21:09 -05:00
powerpc [PowerPC64] add mpr to GENERIC64 and GENERIC64LE 2021-03-09 21:09:49 -03:00
riscv riscv: fix errors in some atomic type aliases 2021-03-08 10:03:01 -04:00
rpc nfs-over-tls: handle res.gid.gid_val correctly for memory allocation 2021-01-12 13:59:52 -08:00
security close_range: add audit support 2021-03-17 22:22:48 +00:00
sys Fix a few typos in comments 2021-03-20 11:13:01 +01:00
teken loader: implement framebuffer console 2021-01-02 21:41:36 +02:00
tests Enable running fib tests inside vnet jail. 2021-01-17 20:32:26 +00:00
tools Switch to the new device-tree vendor tree 2021-01-15 20:08:39 +01:00
ufs FFS extattr: fix handling of the tail 2021-03-04 21:07:25 +02:00
vm uma: allow uma_zfree_pcu(..., NULL) 2021-03-19 23:40:07 +01:00
x86 Rename _cscan_atomic.h and _cscan_bus.h to atomic_san.h and bus_san.h 2021-03-15 11:39:11 -04:00
xdr xdr: clean up empty lines in .c and .h files 2020-09-01 22:13:28 +00:00
xen xen: remove .swp file from public headers 2021-01-11 18:14:11 +01:00
Makefile