From owner-svn-src-head@FreeBSD.ORG Wed Jun 10 07:08:45 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1266C1065674; Wed, 10 Jun 2009 07:08:45 +0000 (UTC) (envelope-from mat.macy@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.240]) by mx1.freebsd.org (Postfix) with ESMTP id 8D7CC8FC0C; Wed, 10 Jun 2009 07:08:44 +0000 (UTC) (envelope-from mat.macy@gmail.com) Received: by an-out-0708.google.com with SMTP id c3so323156ana.13 for ; Wed, 10 Jun 2009 00:08:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=HyQYo1dpW2kjase9LbbWIbwRvib4cKsFtpAoY2OlU5c=; b=wdMMz2CaN84m4tq1AyhumuTAiQSfnV+zAtXp8gxpXCyxZ2n5wCStQgpNPV6rGL0N4y NP3fGk6cpftc1H8GYqF+5m+arorF6OLcoDMwrWCoC9ErulnDISOQdSuj8kFf8WK3b+GY 9yiyN6pJVm7qITbYd2Z+mgrr8x9DwxbV/J+fA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=llobfdk2qvwLJa5qW/+zGzH2aqApy/1A3gB8B+K1LIUFN4pFf/tJSeKbnNqGXahXOM qyZaZAmFA+DhdTk4dKzVyLDNJSsv+QER4emuG0+LD4QZZRNdxI680fwwXRTzzCjvV23K hn5IN9JZyQQd/0DzS1GRxdAq0qkAIjmdDzcnM= MIME-Version: 1.0 Sender: mat.macy@gmail.com Received: by 10.100.14.2 with SMTP id 2mr907050ann.68.1244617723761; Wed, 10 Jun 2009 00:08:43 -0700 (PDT) In-Reply-To: References: <200906100121.n5A1LWVO089719@svn.freebsd.org> <3c1674c90906092324n58e16154s6800e61752282e42@mail.gmail.com> Date: Wed, 10 Jun 2009 00:08:43 -0700 X-Google-Sender-Auth: 297f05ea4874ef27 Message-ID: <3c1674c90906100008i4c632312j32f223b8aca14934@mail.gmail.com> From: Kip Macy To: Dmitry Morozovsky Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r193878 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2009 07:08:45 -0000 On Wed, Jun 10, 2009 at 12:00 AM, Dmitry Morozovsky wrote: > On Tue, 9 Jun 2009, Kip Macy wrote: > > KM> > KM> =A0 As far as I can tell systems that have less than 4GB are mo= re often hurt > KM> > KM> =A0 by prefetched than helped. =A0On i386 systems and systems w= ith less than 4GB, > KM> > KM> =A0 prefetch is now disabled by default. I've added a prefetch = enable tunable, to > KM> > KM> =A0 enable prefetching for those systems. The prefetch disable = tunable will continue > KM> > KM> =A0 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 simpl= e bool > KM> > zfs_prefetch tunable (defauled to what looks more reasonable to par= tucilar > 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=3D=3Di386 || memsize < 4G > =A0 =A0 =A0 =A0zfs_prefetch=3D0 > else > =A0 =A0 =A0 =A0zfs_prefetch=3D1 > > 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. I'll ask around. Cheers, Kip