Some kernel subsystems, notably ZFS, will destroy UMA zones from a
shutdown eventhandler. For slabs that are mapped into KVA this can be
very expensive and so it needlessly delays the shutdown process.
Add a new state to the "booted" variable, BOOT_SHUTDOWN. Once
kern_reboot() starts invoking shutdown handlers, turn uma_zdestroy()
into a no-op. In the future I plan to implement periodic preening of
cached items in excess of the WSS, which would alleviate the problem
somewhat, but this patch is simple and can be backported to the stable
branches.
PR: 242427