diff --git a/include/sys/dmu_tx.h b/include/sys/dmu_tx.h index 74b7e11163..6a4bd3fac2 100644 --- a/include/sys/dmu_tx.h +++ b/include/sys/dmu_tx.h @@ -124,6 +124,7 @@ typedef struct dmu_tx_stats { kstat_named_t dmu_tx_dirty_throttle; kstat_named_t dmu_tx_dirty_delay; kstat_named_t dmu_tx_dirty_over_max; + kstat_named_t dmu_tx_dirty_frees_delay; kstat_named_t dmu_tx_quota; } dmu_tx_stats_t; diff --git a/module/zfs/dmu.c b/module/zfs/dmu.c index 0d2f03e22c..9d00098c8b 100644 --- a/module/zfs/dmu.c +++ b/module/zfs/dmu.c @@ -826,6 +826,7 @@ dmu_free_long_range_impl(objset_t *os, dnode_t *dn, uint64_t offset, */ if (dirty_frees_threshold != 0 && long_free_dirty_all_txgs >= dirty_frees_threshold) { + DMU_TX_STAT_BUMP(dmu_tx_dirty_frees_delay); txg_wait_open(dp, 0); continue; } diff --git a/module/zfs/dmu_tx.c b/module/zfs/dmu_tx.c index ab6ec29e77..c63ba6405a 100644 --- a/module/zfs/dmu_tx.c +++ b/module/zfs/dmu_tx.c @@ -53,6 +53,7 @@ dmu_tx_stats_t dmu_tx_stats = { { "dmu_tx_dirty_throttle", KSTAT_DATA_UINT64 }, { "dmu_tx_dirty_delay", KSTAT_DATA_UINT64 }, { "dmu_tx_dirty_over_max", KSTAT_DATA_UINT64 }, + { "dmu_tx_dirty_frees_delay", KSTAT_DATA_UINT64 }, { "dmu_tx_quota", KSTAT_DATA_UINT64 }, };