]> git.proxmox.com Git - mirror_zfs.git/commitdiff
Reduce async_destroy_001_pos memory requirements
authorBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 6 Jun 2017 18:30:47 +0000 (11:30 -0700)
committerGitHub <noreply@github.com>
Tue, 6 Jun 2017 18:30:47 +0000 (11:30 -0700)
The number of blocks which can be freed per TXG is controlled
by the zfs_free_max_blocks module option (defaults to 100,000).
Both speed up this test case and reduce the memory requirements
by only creating 4 TXGs worth of blocks to be freed.

Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #5479
Closes #6192

tests/zfs-tests/tests/functional/features/async_destroy/async_destroy_001_pos.ksh
tests/zfs-tests/tests/functional/features/async_destroy/setup.ksh

index b9f1837d622c3c8bcc07d51336f8d4c82e60d405..7258e635bca653166eb6bf64c9ddb308c89d63de 100755 (executable)
@@ -46,11 +46,6 @@ TEST_FS=$TESTPOOL/async_destroy
 
 verify_runnable "both"
 
-# See issue: https://github.com/zfsonlinux/zfs/issues/5479
-if is_kmemleak; then
-       log_unsupported "Test case runs slowly when kmemleak is enabled"
-fi
-
 function cleanup
 {
        datasetexists $TEST_FS && log_must zfs destroy $TEST_FS
@@ -61,8 +56,11 @@ log_assert "async_destroy can suspend and resume traversal"
 
 log_must zfs create -o recordsize=512 -o compression=off $TEST_FS
 
-# Fill with 1G
-log_must dd bs=1024k count=1024 if=/dev/zero of=/$TEST_FS/file
+# Create enough blocks that it will take 4 TXGs to free them all.
+typeset zfs_free_max_blocks=100000
+typeset blocks=$((zfs_free_max_blocks * 4 * 512 / 1024 / 1024))
+
+log_must dd bs=1024k count=$blocks if=/dev/zero of=/$TEST_FS/file
 
 log_must zfs destroy $TEST_FS
 
index 3decfbfe00d0880854fac2cc6e0560c354084fbf..d275e063b13a7345760d26954e814e3404db51c8 100755 (executable)
 
 . $STF_SUITE/include/libtest.shlib
 
-if is_32bit; then
-       log_unsupported "Test case fails on 32-bit systems"
-fi
-
 DISK=${DISKS%% *}
 
 default_setup $DISK