]> granicus.if.org Git - zfs/commitdiff
Introduce kstat dmu_tx_dirty_frees_delay
authorFeng Sun <loyou85@gmail.com>
Wed, 25 Jul 2018 16:52:27 +0000 (00:52 +0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 25 Jul 2018 16:52:27 +0000 (09:52 -0700)
It is helpful to tune zfs_per_txg_dirty_frees_percent for commit
539d33c7(OpenZFS 6569 - large file delete can starve out write ops).

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: Richard Elling <Richard.Elling@RichardElling.com>
Signed-off-by: Feng Sun <loyou85@gmail.com>
Closes #7718

include/sys/dmu_tx.h
module/zfs/dmu.c
module/zfs/dmu_tx.c

index 74b7e1116382696c6582a83302667eba6718bd09..6a4bd3fac2c0bd212767bffe1bedbdbace270b3d 100644 (file)
@@ -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;
 
index 0d2f03e22c4b8c9ff723af214349cb755d866dfe..9d00098c8b0dc07ce38b9c6ce24941f7febd3985 100644 (file)
@@ -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;
                }
index ab6ec29e77f2a6002352778c3a4a649512fa632d..c63ba6405a71c65ee9d4a34d0b0233df57731d4e 100644 (file)
@@ -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 },
 };