summaryrefslogtreecommitdiffstats
path: root/module/zfs/arc.c
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2017-05-01 13:01:39 -0700
committerGitHub <[email protected]>2017-05-01 13:01:39 -0700
commite99932f7dec6efeb006e225e0bf0901c30345cac (patch)
treed60a90b668446903de304086a6480bef5fd38c42 /module/zfs/arc.c
parent692e55b8fea00a0d0bd46188d68031292f04e4a8 (diff)
Limit zfs_dirty_data_max_max to 4G
Reinstate default 4G zfs_dirty_data_max_max limit. Reviewed-by: Giuseppe Di Natale <[email protected]> Reviewed-by: Chunwei Chen <[email protected]> Reviewed-by: George Melikov <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #6072 Closes #6081
Diffstat (limited to 'module/zfs/arc.c')
-rw-r--r--module/zfs/arc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/module/zfs/arc.c b/module/zfs/arc.c
index d6244d19e..25fdbdd2b 100644
--- a/module/zfs/arc.c
+++ b/module/zfs/arc.c
@@ -6519,11 +6519,11 @@ arc_init(void)
* If it has been set by a module parameter, take that.
* Otherwise, use a percentage of physical memory defined by
* zfs_dirty_data_max_percent (default 10%) with a cap at
- * zfs_dirty_data_max_max (default 25% of physical memory).
+ * zfs_dirty_data_max_max (default 4G or 25% of physical memory).
*/
if (zfs_dirty_data_max_max == 0)
- zfs_dirty_data_max_max = allmem *
- zfs_dirty_data_max_max_percent / 100;
+ zfs_dirty_data_max_max = MIN(4ULL * 1024 * 1024 * 1024,
+ allmem * zfs_dirty_data_max_max_percent / 100);
if (zfs_dirty_data_max == 0) {
zfs_dirty_data_max = allmem *