summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFeng Sun <[email protected]>2018-07-26 00:52:27 +0800
committerBrian Behlendorf <[email protected]>2018-07-25 09:52:27 -0700
commit750e1f88d386b752283de7ed763af2a189b73677 (patch)
tree5656475f18f12c9db61fac294797ffd7780298f2
parent473c976a0c4da84d8b49edaaf3d88a716d8dde2c (diff)
Introduce kstat dmu_tx_dirty_frees_delay
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 <[email protected]> Reviewed by: Richard Elling <[email protected]> Signed-off-by: Feng Sun <[email protected]> Closes #7718
-rw-r--r--include/sys/dmu_tx.h1
-rw-r--r--module/zfs/dmu.c1
-rw-r--r--module/zfs/dmu_tx.c1
3 files changed, 3 insertions, 0 deletions
diff --git a/include/sys/dmu_tx.h b/include/sys/dmu_tx.h
index 74b7e1116..6a4bd3fac 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 0d2f03e22..9d00098c8 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 ab6ec29e7..c63ba6405 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 },
};