From owner-svn-src-all@FreeBSD.ORG Tue Feb 18 13:59:06 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D5EB8DFE; Tue, 18 Feb 2014 13:59:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C1C66179D; Tue, 18 Feb 2014 13:59:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1IDx6j3051559; Tue, 18 Feb 2014 13:59:06 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1IDx6Hh051558; Tue, 18 Feb 2014 13:59:06 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201402181359.s1IDx6Hh051558@svn.freebsd.org> From: Andriy Gapon Date: Tue, 18 Feb 2014 13:59:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r262157 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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: Tue, 18 Feb 2014 13:59:06 -0000 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