]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
devctl: move to using a uma zone
authorimp <imp@FreeBSD.org>
Sat, 29 Aug 2020 04:29:53 +0000 (04:29 +0000)
committerimp <imp@FreeBSD.org>
Sat, 29 Aug 2020 04:29:53 +0000 (04:29 +0000)
commit841519a2041f67ec5bc8aeabad4a4e985c1d0e2f
treee98b29c2e675ab10c0bcd0b2ef84182d85200eec
parent03fb2b6f1ee4d1e09b6207446f30e981f5531c28
devctl: move to using a uma zone

Convert the memory management of devctl.  Rewrite if to make better
use of memory. This eliminates several mallocs (5? worse case) needed
to send a message. It's now possible to always send a message, though
if things are really backed up the oldest message will be dropped to
free up space for the newest.

Add a static bus_child_{location,pnpinfo}_sb to start migrating to
sbuf instead of buffer + length. Use it in the new code.  Other code
will be converted later (bus_child_*_str is only used inside of
subr_bus.c, though implemented in ~100 places in the tree).

Reviewed by: markj@
Differential Revision: https://reviews.freebsd.org/D26140
sys/kern/subr_bus.c