svn commit: r262157 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

Andriy Gapon avg at FreeBSD.org
Tue Feb 18 13:59:06 UTC 2014


Author: avg
Date: Tue Feb 18 13:59:06 2014
New Revision: 262157
URL: http://svnweb.freebsd.org/changeset/base/262157

Log:
  MFC r250149: In case ZFS doesn't use UMA for buffers there's no need to
  waste memory

Modified:
  stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/cddl/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)

Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c
==============================================================================
--- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c	Tue Feb 18 13:58:55 2014	(r262156)
+++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c	Tue Feb 18 13:59:06 2014	(r262157)
@@ -130,6 +130,8 @@ zio_init(void)
 	    sizeof (zio_t), 0, NULL, NULL, NULL, NULL, NULL, 0);
 	zio_link_cache = kmem_cache_create("zio_link_cache",
 	    sizeof (zio_link_t), 0, NULL, NULL, NULL, NULL, NULL, 0);
+	if (!zio_use_uma)
+		goto out;
 
 	/*
 	 * For small buffers, we want a cache for each multiple of
@@ -193,6 +195,7 @@ zio_init(void)
 		if (zio_data_buf_cache[c - 1] == NULL)
 			zio_data_buf_cache[c - 1] = zio_data_buf_cache[c];
 	}
+out:
 
 	/*
 	 * The zio write taskqs have 1 thread per cpu, allow 1/2 of the taskqs


More information about the svn-src-all mailing list