From owner-svn-src-all@FreeBSD.ORG Thu Jun 11 22:24:08 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 89E121065670; Thu, 11 Jun 2009 22:24:08 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 76D488FC17; Thu, 11 Jun 2009 22:24:08 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5BMO8VR061878; Thu, 11 Jun 2009 22:24:08 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5BMO8rm061874; Thu, 11 Jun 2009 22:24:08 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200906112224.n5BMO8rm061874@svn.freebsd.org> From: Kip Macy Date: Thu, 11 Jun 2009 22:24:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194043 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jun 2009 22:24:09 -0000 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.