diff options
-rw-r--r-- | module/zfs/dsl_pool.c | 2 | ||||
-rw-r--r-- | module/zfs/txg.c | 14 |
2 files changed, 8 insertions, 8 deletions
diff --git a/module/zfs/dsl_pool.c b/module/zfs/dsl_pool.c index 704f034e9..771b265c2 100644 --- a/module/zfs/dsl_pool.c +++ b/module/zfs/dsl_pool.c @@ -143,7 +143,7 @@ dsl_pool_txg_history_add(dsl_pool_t *dp, uint64_t txg) { txg_history_t *th, *rm; - th = kmem_zalloc(sizeof(txg_history_t), KM_SLEEP); + th = kmem_zalloc(sizeof(txg_history_t), KM_PUSHPAGE); mutex_init(&th->th_lock, NULL, MUTEX_DEFAULT, NULL); th->th_kstat.txg = txg; th->th_kstat.state = TXG_STATE_OPEN; diff --git a/module/zfs/txg.c b/module/zfs/txg.c index c7c3df3f8..7c820af4f 100644 --- a/module/zfs/txg.c +++ b/module/zfs/txg.c @@ -367,6 +367,13 @@ txg_quiesce(dsl_pool_t *dp, uint64_t txg) tx->tx_open_txg++; /* + * Now that we've incremented tx_open_txg, we can let threads + * enter the next transaction group. + */ + for (c = 0; c < max_ncpus; c++) + mutex_exit(&tx->tx_cpu[c].tc_lock); + + /* * Measure how long the txg was open and replace the kstat. */ th = dsl_pool_txg_history_get(dp, txg); @@ -376,13 +383,6 @@ txg_quiesce(dsl_pool_t *dp, uint64_t txg) dsl_pool_txg_history_add(dp, tx->tx_open_txg); /* - * Now that we've incremented tx_open_txg, we can let threads - * enter the next transaction group. - */ - for (c = 0; c < max_ncpus; c++) - mutex_exit(&tx->tx_cpu[c].tc_lock); - - /* * Quiesce the transaction group by waiting for everyone to txg_exit(). */ start = gethrtime(); |