Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Sep 2014 15:24:36 +0000 (UTC)
From:      Xin LI <delphij@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org
Subject:   svn commit: r271515 - vendor-sys/illumos/dist/uts/common/fs/zfs
Message-ID:  <201409131524.s8DFOaHI080057@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: delphij
Date: Sat Sep 13 15:24:35 2014
New Revision: 271515
URL: http://svnweb.freebsd.org/changeset/base/271515

Log:
  5138 add tunable for maximum number of blocks freed in one txg
  Reviewed by: Adam Leventhal <adam.leventhal@delphix.com>
  Reviewed by: Mattew Ahrens <mahrens@delphix.com>
  Reviewed by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
  Reviewed by: Richard Elling <richard.elling@gmail.com>
  Reviewed by: George Wilson <george.wilson@delphix.com>
  Approved by: Dan McDonald <danmcd@omniti.com>
  Author: Max Grossman <max.grossman@delphix.com>
  
  illumos/illumos-gate@af3465da8fa420c4ec701e3e57704d537a6f755b

Modified:
  vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_scan.c

Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_scan.c
==============================================================================
--- vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_scan.c	Sat Sep 13 15:22:08 2014	(r271514)
+++ vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_scan.c	Sat Sep 13 15:24:35 2014	(r271515)
@@ -69,6 +69,8 @@ boolean_t zfs_no_scrub_io = B_FALSE; /* 
 boolean_t zfs_no_scrub_prefetch = B_FALSE; /* set to disable scrub prefetch */
 enum ddt_class zfs_scrub_ddt_class_max = DDT_CLASS_DUPLICATE;
 int dsl_scan_delay_completion = B_FALSE; /* set to delay scan completion */
+/* max number of blocks to free in a single TXG */
+uint64_t zfs_free_max_blocks = UINT64_MAX;
 
 #define	DSL_SCAN_IS_SCRUB_RESILVER(scn) \
 	((scn)->scn_phys.scn_func == POOL_SCAN_SCRUB || \
@@ -1319,6 +1321,9 @@ dsl_scan_free_should_pause(dsl_scan_t *s
 	if (zfs_recover)
 		return (B_FALSE);
 
+	if (scn->scn_visited_this_txg >= zfs_free_max_blocks)
+		return (B_TRUE);
+
 	elapsed_nanosecs = gethrtime() - scn->scn_sync_start_time;
 	return (elapsed_nanosecs / NANOSEC > zfs_txg_timeout ||
 	    (NSEC2MSEC(elapsed_nanosecs) > zfs_free_min_time_ms &&



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201409131524.s8DFOaHI080057>