Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Jun 2009 08:34:01 +0000
From:      Alexey Dokuchaev <danfe@FreeBSD.org>
To:        Kip Macy <kmacy@freebsd.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Dmitry Morozovsky <marck@rinet.ru>
Subject:   Re: svn commit: r193878 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Message-ID:  <20090610083400.GA70060@FreeBSD.org>
In-Reply-To: <3c1674c90906100008i4c632312j32f223b8aca14934@mail.gmail.com>
References:  <200906100121.n5A1LWVO089719@svn.freebsd.org> <alpine.BSF.2.00.0906101013480.49870@woozle.rinet.ru> <3c1674c90906092324n58e16154s6800e61752282e42@mail.gmail.com> <alpine.BSF.2.00.0906101058140.49870@woozle.rinet.ru> <3c1674c90906100008i4c632312j32f223b8aca14934@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jun 10, 2009 at 12:08:43AM -0700, Kip Macy wrote:
> On Wed, Jun 10, 2009 at 12:00 AM, Dmitry Morozovsky<marck@rinet.ru> wrote:
> > On Tue, 9 Jun 2009, Kip Macy wrote:
> >
> > KM> > KM> š As far as I can tell systems that have less than 4GB are more often hurt
> > KM> > KM> š by prefetched than helped. šOn i386 systems and systems with less than 4GB,
> > KM> > KM> š prefetch is now disabled by default. I've added a prefetch enable tunable, to
> > KM> > KM> š enable prefetching for those systems. The prefetch disable tunable will continue
> > KM> > KM> š to unconditionally disable prefetching.
> > KM> > KM>
> > KM> >
> > KM> > [snip]
> > KM> >
> > KM> > KM> +extern int zfs_prefetch_disable;
> > KM> > KM> +extern int zfs_prefetch_enable;
> > KM> >
> > KM> > [snip]
> > KM> >
> > KM> > Before the interface is not settled in stone, don't you think simple bool
> > KM> > zfs_prefetch tunable (defauled to what looks more reasonable to partucilar
> > KM> > arch/memsize) is more clean and straightforward?
> > KM> >
> > KM>
> > KM> Yes. But the semantics I want don't lend themselves well to a boolean.
> > KM> I want it to default to off for i386 and amd64 w/ < 4GB and on for
> > KM> amd64 > 4GB. However, I want it to be possible for users with larger
> > KM> memory systems to disable it and users with smaller memory systems to
> > KM> enable it. The only way a simple boolean would work would be if it
> > KM> were zfs_prefetch_non_default_behavior, which I think is even more
> > KM> confusing than what I have now.
> >
> > Hmm, I failed to see how boolean prevent the usage:
> >
> > if arch==i386 || memsize < 4G
> > š š š šzfs_prefetch=0
> > else
> > š š š šzfs_prefetch=1
> >
> > and admin can flip the switch to non-default position.
> >
> 
> Right, what you're advocating is zfs_prefetch_non_default. Which is
> simpler, but still rather weird.

Having special zfs_prefetch_non_default tunable implies that
zfs_prefetch can be only set once (i.e. at boot time), and cannot be
flipped later.  Is that true?  If not, I fail to see the need for
zfs_prefetch_non_default or original two-sysctl implementation.

./danfe



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090610083400.GA70060>