Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Jan 2012 22:04:59 +0000 (UTC)
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r230397 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Message-ID:  <201201202204.q0KM4xTN060702@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pjd
Date: Fri Jan 20 22:04:59 2012
New Revision: 230397
URL: http://svn.freebsd.org/changeset/base/230397

Log:
  By default turn off prefetch when listing snapshots.
  In my tests it makes listing snapshots 19% faster with cold cache and
  47% faster with warm cache.
  
  MFC after:	1 week

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c	Fri Jan 20 21:49:56 2012	(r230396)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c	Fri Jan 20 22:04:59 2012	(r230397)
@@ -81,6 +81,12 @@
 
 CTASSERT(sizeof(zfs_cmd_t) < IOCPARM_MAX);
 
+static int snapshot_list_prefetch;
+SYSCTL_DECL(_vfs_zfs);
+TUNABLE_INT("vfs.zfs.snapshot_list_prefetch", &snapshot_list_prefetch);
+SYSCTL_INT(_vfs_zfs, OID_AUTO, snapshot_list_prefetch, CTLFLAG_RW,
+    &snapshot_list_prefetch, 0, "Prefetch data when listing snapshots");
+
 static struct cdev *zfsdev;
 
 extern void zfs_init(void);
@@ -2044,7 +2050,7 @@ zfs_ioc_snapshot_list_next(zfs_cmd_t *zc
 	int error;
 
 top:
-	if (zc->zc_cookie == 0)
+	if (snapshot_list_prefetch && zc->zc_cookie == 0)
 		(void) dmu_objset_find(zc->zc_name, dmu_objset_prefetch,
 		    NULL, DS_FIND_SNAPSHOTS);
 



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