]> git.proxmox.com Git - mirror_zfs.git/blobdiff - include/sys/spa_impl.h
Improve ZFS objset sync parallelism
[mirror_zfs.git] / include / sys / spa_impl.h
index 094258d47a48d1054501f6a0d58a5da9a130ce36..b1eb06f94fcc246f2d8565c097b4fc6faa31f0f4 100644 (file)
@@ -188,6 +188,12 @@ typedef struct spa_taskqs {
        taskq_t **stqs_taskq;
 } spa_taskqs_t;
 
+/* one for each thread in the spa sync taskq */
+typedef struct spa_syncthread_info {
+       kthread_t       *sti_thread;
+       taskq_t         *sti_wr_iss_tq;         /* assigned wr_iss taskq */
+} spa_syncthread_info_t;
+
 typedef enum spa_all_vdev_zap_action {
        AVZ_ACTION_NONE = 0,
        AVZ_ACTION_DESTROY,     /* Destroy all per-vdev ZAPs and the AVZ. */
@@ -265,6 +271,10 @@ struct spa {
        int             spa_alloc_count;
        int             spa_active_allocator;   /* selectable allocator */
 
+       /* per-allocator sync thread taskqs */
+       taskq_t         *spa_sync_tq;
+       spa_syncthread_info_t *spa_syncthreads;
+
        spa_aux_vdev_t  spa_spares;             /* hot spares */
        spa_aux_vdev_t  spa_l2cache;            /* L2ARC cache devices */
        nvlist_t        *spa_label_features;    /* Features for reading MOS */
@@ -456,7 +466,7 @@ extern char *spa_config_path;
 extern const char *zfs_deadman_failmode;
 extern uint_t spa_slop_shift;
 extern void spa_taskq_dispatch_ent(spa_t *spa, zio_type_t t, zio_taskq_type_t q,
-    task_func_t *func, void *arg, uint_t flags, taskq_ent_t *ent);
+    task_func_t *func, void *arg, uint_t flags, taskq_ent_t *ent, zio_t *zio);
 extern void spa_taskq_dispatch_sync(spa_t *, zio_type_t t, zio_taskq_type_t q,
     task_func_t *func, void *arg, uint_t flags);
 extern void spa_load_spares(spa_t *spa);