aboutsummaryrefslogtreecommitdiffstats
path: root/module/zfs/arc.c
diff options
context:
space:
mode:
authorKevin Jin <[email protected]>2021-07-20 11:40:24 -0400
committerGitHub <[email protected]>2021-07-20 09:40:24 -0600
commita7bd20e309a4b45b18b1da8e379f5826debe4870 (patch)
tree269f2d997e22982e7399249bfeea88ee90c01d2e /module/zfs/arc.c
parent8172df643b6cdc7fe233b18c8d8e9b29455ae9f1 (diff)
Add Module Parameter Regarding Log Size Limit
* Add Module Parameters Regarding Log Size Limit zfs_wrlog_data_max The upper limit of TX_WRITE log data. Once it is reached, write operation is blocked, until log data is cleared out after txg sync. It only counts TX_WRITE log with WR_COPIED or WR_NEED_COPY. Reviewed-by: Prakash Surya <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: jxdking <[email protected]> Closes #12284
Diffstat (limited to 'module/zfs/arc.c')
-rw-r--r--module/zfs/arc.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/module/zfs/arc.c b/module/zfs/arc.c
index bf76c8523..02663e8e2 100644
--- a/module/zfs/arc.c
+++ b/module/zfs/arc.c
@@ -7980,6 +7980,18 @@ arc_init(void)
zfs_dirty_data_max = MIN(zfs_dirty_data_max,
zfs_dirty_data_max_max);
}
+
+ if (zfs_wrlog_data_max == 0) {
+
+ /*
+ * dp_wrlog_total is reduced for each txg at the end of
+ * spa_sync(). However, dp_dirty_total is reduced every time
+ * a block is written out. Thus under normal operation,
+ * dp_wrlog_total could grow 2 times as big as
+ * zfs_dirty_data_max.
+ */
+ zfs_wrlog_data_max = zfs_dirty_data_max * 2;
+ }
}
void