From owner-freebsd-arch@FreeBSD.ORG Wed Nov 9 14:56:28 2011 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B42BB106566C; Wed, 9 Nov 2011 14:56:28 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 87FCB8FC08; Wed, 9 Nov 2011 14:56:28 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 22AE346B06; Wed, 9 Nov 2011 09:56:28 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id B83A38A050; Wed, 9 Nov 2011 09:56:27 -0500 (EST) From: John Baldwin To: freebsd-arch@freebsd.org Date: Wed, 9 Nov 2011 09:26:19 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p8; KDE/4.5.5; amd64; ; ) References: <201110281426.00013.jhb@freebsd.org> <20111109043512.GT6110@elvis.mu.org> <3D0BF37D-0C31-4509-A231-F4D1F81472D8@kientzle.com> In-Reply-To: <3D0BF37D-0C31-4509-A231-F4D1F81472D8@kientzle.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201111090926.19447.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Wed, 09 Nov 2011 09:56:27 -0500 (EST) Cc: Bruce Cran , Tim Kientzle , Jilles Tjoelker , Ed Schouten , Alfred Perlstein , arch@freebsd.org Subject: Re: [PATCH] fadvise(2) system call X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Nov 2011 14:56:28 -0000 On Wednesday, November 09, 2011 1:18:07 am Tim Kientzle wrote: > It's not at all obvious. > > If I have 1GB of cache and I'm going > to generate and then read back a 2GB file, > the best strategy is to hold the first > 1GB in cache. > > If I'm going to write the file and it will never be > read back, then the best strategy is to not > cache any of it. > > Sometimes, a program knows which of > these is likely, but if it doesn't know, it shouldn't > say. Exactly. -- John Baldwin