]> git.proxmox.com Git - mirror_zfs.git/commit
Linux: Cleanup taskq threads spawn/exit
authorAlexander Motin <mav@FreeBSD.org>
Tue, 13 Feb 2024 19:15:16 +0000 (14:15 -0500)
committerGitHub <noreply@github.com>
Tue, 13 Feb 2024 19:15:16 +0000 (11:15 -0800)
commite0bd8118d04b55b7adf3d9ba256ad4bb53e66512
treebd2f490d3b06c8fd3fac51b1bdc95e2a5ee535a4
parenta0635ae731735d2ec383396ba57e79ee608f7a54
Linux: Cleanup taskq threads spawn/exit

This changes taskq_thread_should_stop() to limit maximum exit rate
for idle threads to one per 5 seconds.  I believe the previous one
was broken, not allowing any thread exits for tasks arriving more
than one at a time and so completing while others are running.

Also while there:
 - Remove taskq_thread_spawn() calls on task allocation errors.
 - Remove extra taskq_thread_should_stop() call.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Rich Ercolani <rincebrain@gmail.com>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored by: iXsystems, Inc.
Closes #15873
include/os/linux/spl/sys/taskq.h
man/man4/spl.4
module/os/linux/spl/spl-taskq.c