Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Jun 2009 22:24:08 +0000 (UTC)
From:      Kip Macy <kmacy@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r194043 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys
Message-ID:  <200906112224.n5BMO8rm061874@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kmacy
Date: Thu Jun 11 22:24:08 2009
New Revision: 194043
URL: http://svn.freebsd.org/changeset/base/194043

Log:
  pjd has requested that I keep the tunable as zfs_prefetch_disable to minimize gratuitous
  differences with Opensolaris' ZFS
  
  Sorry for the churn

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_zfetch.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c	Thu Jun 11 22:00:54 2009	(r194042)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c	Thu Jun 11 22:24:08 2009	(r194043)
@@ -158,7 +158,7 @@ static int		arc_grow_retry = 60;
  */
 static int		arc_min_prefetch_lifespan;
 
-extern int zfs_prefetch_enable;
+extern int zfs_prefetch_disable;
 static int arc_dead;
 
 /*
@@ -3552,21 +3552,21 @@ arc_init(void)
 	mutex_init(&zfs_write_limit_lock, NULL, MUTEX_DEFAULT, NULL);
 
 #ifdef _KERNEL
-	if (TUNABLE_INT_FETCH("vfs.zfs.prefetch_enable", &zfs_prefetch_enable))
+	if (TUNABLE_INT_FETCH("vfs.zfs.prefetch_disable", &zfs_prefetch_disable))
 		prefetch_tunable_set = 1;
 	
 #ifdef __i386__
 	if (prefetch_tunable_set == 0) {
 		printf("ZFS NOTICE: prefetch is disabled by default on i386"
 		    " - add enable to tunable to change.\n" );
-		zfs_prefetch_enable=0;
+		zfs_prefetch_disable=1;
 	}
 #else	
 	if ((((uint64_t)physmem * PAGESIZE) < (1ULL << 32)) &&
 	    prefetch_tunable_set == 0) {
 		printf("ZFS NOTICE: system has less than 4GB and prefetch enable is not set"
 		    "... disabling.\n");
-		zfs_prefetch_enable=0;
+		zfs_prefetch_disable=1;
 	}
 #endif	
 	/* Warn about ZFS memory and address space requirements. */

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c	Thu Jun 11 22:00:54 2009	(r194042)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c	Thu Jun 11 22:24:08 2009	(r194043)
@@ -326,7 +326,7 @@ dmu_prefetch(objset_t *os, uint64_t obje
 	uint64_t blkid;
 	int nblks, i, err;
 
-	if (zfs_prefetch_enable == 0)
+	if (zfs_prefetch_disable)
 		return;
 
 	if (len == 0) {  /* they're interested in the bonus buffer */

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_zfetch.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_zfetch.c	Thu Jun 11 22:00:54 2009	(r194042)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_zfetch.c	Thu Jun 11 22:24:08 2009	(r194043)
@@ -37,7 +37,7 @@
  * until we can get this working the way we want it to.
  */
 
-int zfs_prefetch_enable = 1;
+int zfs_prefetch_disable = 0;
 
 /* max # of streams per zfetch */
 uint32_t	zfetch_max_streams = 8;
@@ -49,8 +49,8 @@ uint32_t	zfetch_block_cap = 256;
 uint64_t	zfetch_array_rd_sz = 1024 * 1024;
 
 SYSCTL_DECL(_vfs_zfs);
-SYSCTL_INT(_vfs_zfs, OID_AUTO, prefetch_enable, CTLFLAG_RDTUN,
-    &zfs_prefetch_enable, 0, "Enable prefetch for systems with less than 4GB");
+SYSCTL_INT(_vfs_zfs, OID_AUTO, prefetch_disable, CTLFLAG_RDTUN,
+    &zfs_prefetch_disable, 0, "Disable prefetch");
 SYSCTL_NODE(_vfs_zfs, OID_AUTO, zfetch, CTLFLAG_RW, 0, "ZFS ZFETCH");
 TUNABLE_INT("vfs.zfs.zfetch.max_streams", &zfetch_max_streams);
 SYSCTL_UINT(_vfs_zfs_zfetch, OID_AUTO, max_streams, CTLFLAG_RDTUN,
@@ -598,7 +598,7 @@ dmu_zfetch(zfetch_t *zf, uint64_t offset
 	unsigned int	blkshft;
 	uint64_t	blksz;
 
-	if (zfs_prefetch_enable == 0)
+	if (zfs_prefetch_disable)
 		return;
 
 	/* files that aren't ln2 blocksz are only one block -- nothing to do */

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h	Thu Jun 11 22:00:54 2009	(r194042)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h	Thu Jun 11 22:24:08 2009	(r194043)
@@ -457,7 +457,7 @@ int dmu_write_uio(objset_t *os, uint64_t
 int dmu_write_pages(objset_t *os, uint64_t object, uint64_t offset,
     uint64_t size, struct page *pp, dmu_tx_t *tx);
 
-extern int zfs_prefetch_enable;
+extern int zfs_prefetch_disable;
 
 /*
  * Asynchronously try to read in the data.



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