mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-23 02:44:41 +03:00
Use tsd to store tq for taskq_member
To prevent taskq_member holding tq_lock and doing linear search, thus causing contention. We store the taskq pointer to which the thread belongs in tsd. This way taskq_member will not need to touch tq_lock, and tsd has per slot spinlock. So the contention should be reduced greatly. Signed-off-by: Chunwei Chen <david.chen@osnexus.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #500 Closes #504 Closes #505
This commit is contained in:
committed by
Brian Behlendorf
parent
de77e24590
commit
16522ac290
+1
-1
@@ -140,7 +140,7 @@ extern void taskq_wait_id(taskq_t *, taskqid_t);
|
||||
extern void taskq_wait_outstanding(taskq_t *, taskqid_t);
|
||||
extern void taskq_wait(taskq_t *);
|
||||
extern int taskq_cancel_id(taskq_t *, taskqid_t);
|
||||
extern int taskq_member(taskq_t *, void *);
|
||||
extern int taskq_member(taskq_t *, kthread_t *);
|
||||
|
||||
#define taskq_create_proc(name, nthreads, pri, min, max, proc, flags) \
|
||||
taskq_create(name, nthreads, pri, min, max, flags)
|
||||
|
||||
@@ -35,6 +35,7 @@ typedef void (*dtor_func_t)(void *);
|
||||
|
||||
extern int tsd_set(uint_t, void *);
|
||||
extern void *tsd_get(uint_t);
|
||||
extern void *tsd_get_by_thread(uint_t, kthread_t *);
|
||||
extern void tsd_create(uint_t *, dtor_func_t);
|
||||
extern void tsd_destroy(uint_t *);
|
||||
extern void tsd_exit(void);
|
||||
|
||||
Reference in New Issue
Block a user