From owner-svn-src-head@FreeBSD.ORG Wed Jun 10 06:24:51 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 AC4291065673; Wed, 10 Jun 2009 06:24:51 +0000 (UTC) (envelope-from mat.macy@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.247]) by mx1.freebsd.org (Postfix) with ESMTP id 36CE28FC08; Wed, 10 Jun 2009 06:24:51 +0000 (UTC) (envelope-from mat.macy@gmail.com) Received: by an-out-0708.google.com with SMTP id c3so310142ana.13 for ; Tue, 09 Jun 2009 23:24:50 -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=5HfGBWZa9aqoSXv8WGQ8ovazVayoS7VrDIMyN9r3SaM=; b=YKRm4xUSs8Mhyw6z+o0tUPORTt3PdCKHhqNqMq7WGRQIXEhP5AnYtqxXBdJ8fWb0mT B4j5ctpuJiUstFkZUW4XJtfLsdOMbNddk1dUua1EJTFJY8xxNXpISRugN0Vnejx1KFYi FHqrisNxLUK4YtddTkp4XnTK7hn8hWh5mDsEY= 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=e9MZh8coibP64vwb1aSrIKsU8/aB3Pcnzgv8CMA+ux2q4HI3IDMKF7z+Gwzpqt4VNv 3JvOCP6HjdE3/MV8A3+IKnig65Jw6csU6MAYi9OyIivSrIzGsUl0pBVlzLdJFmKetZIF +1+vCd6/ENlmgU1ZqILoaJGJxi2d4+bGCKLO4= MIME-Version: 1.0 Sender: mat.macy@gmail.com Received: by 10.100.249.5 with SMTP id w5mr895789anh.28.1244615090406; Tue, 09 Jun 2009 23:24:50 -0700 (PDT) In-Reply-To: References: <200906100121.n5A1LWVO089719@svn.freebsd.org> Date: Tue, 9 Jun 2009 23:24:50 -0700 X-Google-Sender-Auth: 7e12a32e9ec42d11 Message-ID: <3c1674c90906092324n58e16154s6800e61752282e42@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 06:24:52 -0000 On Tue, Jun 9, 2009 at 11:15 PM, Dmitry Morozovsky wrote: > Kip, > > On Wed, 10 Jun 2009, Kip Macy wrote: > > KM> Author: kmacy > KM> Date: Wed Jun 10 01:21:32 2009 > KM> New Revision: 193878 > KM> URL: http://svn.freebsd.org/changeset/base/193878 > KM> > KM> Log: > KM> =A0 As far as I can tell systems that have less than 4GB are more oft= en hurt > KM> =A0 by prefetched than helped. =A0On i386 systems and systems with le= ss than 4GB, > KM> =A0 prefetch is now disabled by default. I've added a prefetch enable= tunable, to > KM> =A0 enable prefetching for those systems. The prefetch disable tunabl= e will continue > KM> =A0 to unconditionally disable prefetching. > KM> > > [snip] > > KM> +extern int zfs_prefetch_disable; > KM> +extern int zfs_prefetch_enable; > > [snip] > > Before the interface is not settled in stone, don't you think simple bool > zfs_prefetch tunable (defauled to what looks more reasonable to partucila= r > arch/memsize) is more clean and straightforward? > Yes. But the semantics I want don't lend themselves well to a boolean. I want it to default to off for i386 and amd64 w/ < 4GB and on for amd64 > 4GB. However, I want it to be possible for users with larger memory systems to disable it and users with smaller memory systems to enable it. The only way a simple boolean would work would be if it were zfs_prefetch_non_default_behavior, which I think is even more confusing than what I have now. Cheers, Kip