]> git.proxmox.com Git - mirror_zfs.git/blobdiff - module/zfs/txg.c
Limit the amount of dnode metadata in the ARC
[mirror_zfs.git] / module / zfs / txg.c
index 9accd48df062dfc58a56cc94f05ba280ded546dc..ed8007e052385dd944a147cf656de076247ceb36 100644 (file)
@@ -128,7 +128,7 @@ txg_init(dsl_pool_t *dp, uint64_t txg)
                int i;
 
                mutex_init(&tx->tx_cpu[c].tc_lock, NULL, MUTEX_DEFAULT, NULL);
-               mutex_init(&tx->tx_cpu[c].tc_open_lock, NULL, MUTEX_DEFAULT,
+               mutex_init(&tx->tx_cpu[c].tc_open_lock, NULL, MUTEX_NOLOCKDEP,
                    NULL);
                for (i = 0; i < TXG_SIZE; i++) {
                        cv_init(&tx->tx_cpu[c].tc_cv[i], NULL, CV_DEFAULT,
@@ -205,15 +205,15 @@ txg_sync_start(dsl_pool_t *dp)
        tx->tx_threads = 2;
 
        tx->tx_quiesce_thread = thread_create(NULL, 0, txg_quiesce_thread,
-           dp, 0, &p0, TS_RUN, minclsyspri);
+           dp, 0, &p0, TS_RUN, defclsyspri);
 
        /*
         * The sync thread can need a larger-than-default stack size on
         * 32-bit x86.  This is due in part to nested pools and
         * scrub_visitbp() recursion.
         */
-       tx->tx_sync_thread = thread_create(NULL, 32<<10, txg_sync_thread,
-           dp, 0, &p0, TS_RUN, minclsyspri);
+       tx->tx_sync_thread = thread_create(NULL, 0, txg_sync_thread,
+           dp, 0, &p0, TS_RUN, defclsyspri);
 
        mutex_exit(&tx->tx_sync_lock);
 }
@@ -445,8 +445,8 @@ txg_dispatch_callbacks(dsl_pool_t *dp, uint64_t txg)
                         * Commit callback taskq hasn't been created yet.
                         */
                        tx->tx_commit_cb_taskq = taskq_create("tx_commit_cb",
-                           100, minclsyspri, max_ncpus, INT_MAX,
-                           TASKQ_THREADS_CPU_PCT | TASKQ_PREPOPULATE);
+                           max_ncpus, defclsyspri, max_ncpus, max_ncpus * 2,
+                           TASKQ_PREPOPULATE | TASKQ_DYNAMIC);
                }
 
                cb_list = kmem_alloc(sizeof (list_t), KM_SLEEP);