From owner-svn-src-all@freebsd.org Wed May 22 19:49:19 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 845F515B5D91; Wed, 22 May 2019 19:49:19 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1704B95AB0; Wed, 22 May 2019 19:49:19 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from slw by zxy.spb.ru with local (Exim 4.86 (FreeBSD)) (envelope-from ) id 1hTXEh-0005e0-10; Wed, 22 May 2019 22:49:15 +0300 Date: Wed, 22 May 2019 22:49:14 +0300 From: Slawa Olhovchenkov To: Alexander Motin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r348117 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Message-ID: <20190522194914.GF47119@zxy.spb.ru> References: <201905221843.x4MIhmh1012837@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201905221843.x4MIhmh1012837@repo.freebsd.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false X-Rspamd-Queue-Id: 1704B95AB0 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 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: Wed, 22 May 2019 19:49:19 -0000 On Wed, May 22, 2019 at 06:43:48PM +0000, Alexander Motin wrote: > Author: mav > Date: Wed May 22 18:43:48 2019 > New Revision: 348117 > URL: https://svnweb.freebsd.org/changeset/base/348117 > > Log: > Allocate buffers smaller then ABD chunk size as linear. > > This allows to reduce memory waste by letting UMA to put multiple small > buffers into one memory page slab. The page sharing means that UMA > may not be able to free memory page when some of buffers are freed, but > alternatively memory used by that buffer would just be wasted from the > beginning. > > This change follows alike change in ZoL, but unlike Linux (according to > my understanding of it from comments) FreeBSD never shares slabs bigger > then one memory page, so this should be even less invasive then there. > > MFC after: 2 weeks > Sponsored by: iXsystems, Inc. > > Modified: > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c > > Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c > ============================================================================== > --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c Wed May 22 17:42:22 2019 (r348116) > +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c Wed May 22 18:43:48 2019 (r348117) > @@ -290,7 +290,7 @@ abd_free_struct(abd_t *abd) > abd_t * > abd_alloc(size_t size, boolean_t is_metadata) > { > - if (!zfs_abd_scatter_enabled) > + if (!zfs_abd_scatter_enabled || size <= zfs_abd_chunk_size) > return (abd_alloc_linear(size, is_metadata)); may be `size < zfs_abd_chunk_size`? > VERIFY3U(size, <=, SPA_MAXBLOCKSIZE); > _______________________________________________ > svn-src-all@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"