HomeFreeBSD

Reduce bufdaemon/bufspacedaemon shutdown time.

Description

Reduce bufdaemon/bufspacedaemon shutdown time.

Before this change bufdaemon and bufspacedaemon threads used
kthread_shutdown() to stop activity on system shutdown. The problem is
that kthread_shutdown() has no idea about the wait channel and lock used
by specific thread to wake them up reliably. As result, up to 9 threads
could consume up to 9 seconds to shutdown for no good reason.

This change introduces specific shutdown functions, knowing how to
properly wake up specific threads, reducing wait for those threads on
shutdown/reboot from average 4 seconds to effectively zero.

MFC after: 2 weeks
Reviewed by: kib, markj
Differential Revision: https://reviews.freebsd.org/D33936

Details

Provenance
mavAuthored on Jan 19 2022, 12:26 AM
Reviewer
kib
Differential Revision
D33936: Reduce bufdaemon/bufspacedaemon shutdown time
Parents
rG6596f19daa42: etc/defaults/rc.conf: set default of zfskeys_enable to NO
Branches
Unknown
Tags
Unknown