From 29dee3ee9ac68d8a75c0d518b1342f447cd2ddc0 Mon Sep 17 00:00:00 2001 From: Cyril Plisko Date: Tue, 4 Jun 2013 12:25:22 +0300 Subject: [PATCH] Add zfs_sync_pass_* tunable parameters Commit 55d85d5a8c45c4559a4a0e675c37b0c3afb19c2f (backport of the upstream changes) replaced three hardcoded constants: #define SYNC_PASS_DEFERRED_FREE 2 /* defer frees after this pass */ #define SYNC_PASS_DONT_COMPRESS 4 /* don't compress after this pass */ #define SYNC_PASS_REWRITE 1 /* rewrite new bps after this pass */ with a tunable parameters: int zfs_sync_pass_deferred_free = 2; /* defer frees starting in this pass */ int zfs_sync_pass_dont_compress = 5; /* don't compress starting in this pass */ int zfs_sync_pass_rewrite = 2; /* rewrite new bps starting in this pass */ This commit makes these tunables available as module parameters in Linux. They should only be used for performance analysis because changing them can result in subtle and pathological performance problems. Signed-off-by: Brian Behlendorf Closes #1562 --- module/zfs/zio.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/module/zfs/zio.c b/module/zfs/zio.c index 115d200..2e11709 100644 --- a/module/zfs/zio.c +++ b/module/zfs/zio.c @@ -3236,4 +3236,16 @@ MODULE_PARM_DESC(zio_delay_max, "Max zio millisec delay before posting event"); module_param(zio_requeue_io_start_cut_in_line, int, 0644); MODULE_PARM_DESC(zio_requeue_io_start_cut_in_line, "Prioritize requeued I/O"); + +module_param(zfs_sync_pass_deferred_free, int, 0644); +MODULE_PARM_DESC(zfs_sync_pass_deferred_free, + "defer frees starting in this pass"); + +module_param(zfs_sync_pass_dont_compress, int, 0644); +MODULE_PARM_DESC(zfs_sync_pass_dont_compress, + "don't compress starting in this pass"); + +module_param(zfs_sync_pass_rewrite, int, 0644); +MODULE_PARM_DESC(zfs_sync_pass_rewrite, + "rewrite new bps starting in this pass"); #endif -- 1.8.3.1