From owner-freebsd-stable@FreeBSD.ORG Tue Jun 8 10:59:16 2010 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B7AF01065676 for ; Tue, 8 Jun 2010 10:59:16 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from qmta14.westchester.pa.mail.comcast.net (qmta14.westchester.pa.mail.comcast.net [76.96.59.212]) by mx1.freebsd.org (Postfix) with ESMTP id 62D858FC1D for ; Tue, 8 Jun 2010 10:59:15 +0000 (UTC) Received: from omta22.westchester.pa.mail.comcast.net ([76.96.62.73]) by qmta14.westchester.pa.mail.comcast.net with comcast id TNTL1e0041ap0As5ENzGwd; Tue, 08 Jun 2010 10:59:16 +0000 Received: from koitsu.dyndns.org ([98.248.46.159]) by omta22.westchester.pa.mail.comcast.net with comcast id TNzE1e0063S48mS3iNzE36; Tue, 08 Jun 2010 10:59:16 +0000 Received: by icarus.home.lan (Postfix, from userid 1000) id C12409B42E; Tue, 8 Jun 2010 03:59:12 -0700 (PDT) Date: Tue, 8 Jun 2010 03:59:12 -0700 From: Jeremy Chadwick To: Pawel Jakub Dawidek Message-ID: <20100608105912.GA2239@icarus.home.lan> References: <4BE110E3.8040902@zirakzigil.org> <4BE82C5D.1080806@bit0.com> <20100608.181146.1224841629154014733.kasahara@nc.kyushu-u.ac.jp> <20100608095444.GA86953@icarus.home.lan> <20100608102036.GD1789@garage.freebsd.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100608102036.GD1789@garage.freebsd.pl> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: freebsd-stable@freebsd.org Subject: Re: Freebsd 8.0 kmem map too small X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jun 2010 10:59:16 -0000 On Tue, Jun 08, 2010 at 12:20:36PM +0200, Pawel Jakub Dawidek wrote: > On Tue, Jun 08, 2010 at 02:54:44AM -0700, Jeremy Chadwick wrote: > > SYSCTL_DECL(_vfs_zfs); > > SYSCTL_NODE(_vfs_zfs, OID_AUTO, zio, CTLFLAG_RW, 0, "ZFS ZIO"); > > TUNABLE_INT("vfs.zfs.zio.use_uma", &zio_use_uma); > > SYSCTL_INT(_vfs_zfs_zio, OID_AUTO, use_uma, CTLFLAG_RDTUN, &zio_use_uma, 0, > > "Use uma(9) for ZIO allocations"); > > > > Also note that this tunable does not appear in sysctl -a output; I > > believe this is caused by the first parameter to SYSCTL_INT() being > > incorrect -- should be _vfs_zfs, not _vfs_zfs_zio. Regardless of > > that, it's still adjustable in loader.conf. > > Why? I create vfs.zfs.zio node and create vfs.zfs.zio.use_uma sysctl to > match tunable name. Sorry, I was looking at some example code that used _vfs_zfs, not realising the node delimiter is based on the underscore. So to recap, vfs.zfs.zio.use_uma doesn't show up in sysctl output. There are other pieces of code which declare their own node as well, and those do appear. So the question is why this specific tunable doesn't. Looking through comparative code (specifically sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_cache.c) -- 81 SYSCTL_DECL(_vfs_zfs_vdev); 82 SYSCTL_NODE(_vfs_zfs_vdev, OID_AUTO, cache, CTLFLAG_RW, 0, "ZFS VDEV Cache"); 83 TUNABLE_INT("vfs.zfs.vdev.cache.max", &zfs_vdev_cache_max); 84 SYSCTL_INT(_vfs_zfs_vdev_cache, OID_AUTO, max, CTLFLAG_RDTUN, 85 &zfs_vdev_cache_max, 0, "Maximum I/O request size that increase read size"); 86 TUNABLE_INT("vfs.zfs.vdev.cache.size", &zfs_vdev_cache_size); 87 SYSCTL_INT(_vfs_zfs_vdev_cache, OID_AUTO, size, CTLFLAG_RDTUN, 88 &zfs_vdev_cache_size, 0, "Size of VDEV cache"); 89 TUNABLE_INT("vfs.zfs.vdev.cache.bshift", &zfs_vdev_cache_bshift); 90 SYSCTL_INT(_vfs_zfs_vdev_cache, OID_AUTO, bshift, CTLFLAG_RDTUN, 91 &zfs_vdev_cache_bshift, 0, "Turn too small requests into 1 << this value"); While for sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c -- 41 SYSCTL_DECL(_vfs_zfs); 42 SYSCTL_NODE(_vfs_zfs, OID_AUTO, zio, CTLFLAG_RW, 0, "ZFS ZIO"); 43 TUNABLE_INT("vfs.zfs.zio.use_uma", &zio_use_uma); 44 SYSCTL_INT(_vfs_zfs_zio, OID_AUTO, use_uma, CTLFLAG_RDTUN, &zio_use_uma, 0, 45 "Use uma(9) for ZIO allocations"); I think lines 41 and 42 here are incorrect and should have _vfs_zfs_zio as their first parameter? -- | Jeremy Chadwick jdc@parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB |