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                                   j...@parodius.com |
| Parodius Networking                       http://www.parodius.com/ |
| UNIX Systems Administrator                  Mountain View, CA, USA |
| Making life hard for others since 1977.              PGP: 4BD6C0CB |

_______________________________________________
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"

Reply via email to