HomeFreeBSD

Linux: Cleanup taskq threads spawn/exit

Description

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

Details

Provenance
mavAuthored on Feb 13 2024, 7:15 PM
GitHub <noreply@github.com>Committed on Feb 13 2024, 7:15 PM
Parents
rGa0635ae73173: zdb: Fix false leak report for BRT objects
Branches
Unknown
Tags
Unknown