diff options
author | Davide Italiano <davide@FreeBSD.org> | 2013-05-01 17:34:44 +0000 |
---|---|---|
committer | Davide Italiano <davide@FreeBSD.org> | 2013-05-01 17:34:44 +0000 |
commit | a28d25df31f61708a2f5521eb232690396f9a4c6 (patch) | |
tree | 1dae5b9c2f25dacfdd4ffccc53842b1a15b84d99 /sys/cddl | |
parent | 1dcb7a5fbe5606e7ce93e2c65e239273484abbbb (diff) | |
download | src-a28d25df31f61708a2f5521eb232690396f9a4c6.tar.gz src-a28d25df31f61708a2f5521eb232690396f9a4c6.zip |
In case ZFS doesn't use UMA for buffers there's no need to waste memory
creating zones that will remain empty.
Reviewed by: pjd
Notes
Notes:
svn path=/head/; revision=250149
Diffstat (limited to 'sys/cddl')
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c index 0f127afcf25c..6bb26bee5e1c 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c @@ -154,6 +154,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 @@ -217,6 +219,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 |