mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
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
This commit is contained in:
@@ -104,7 +104,7 @@ typedef struct taskq {
|
||||
/* list node for the cpu hotplug callback */
|
||||
struct hlist_node tq_hp_cb_node;
|
||||
boolean_t tq_hp_support;
|
||||
unsigned long lastshouldstop; /* when to purge dynamic */
|
||||
unsigned long lastspawnstop; /* when to purge dynamic */
|
||||
} taskq_t;
|
||||
|
||||
typedef struct taskq_ent {
|
||||
|
||||
Reference in New Issue
Block a user