From owner-freebsd-arch@FreeBSD.ORG Wed Nov 9 17:16:50 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 3D330106566B; Wed, 9 Nov 2011 17:16:50 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 291CC8FC12; Wed, 9 Nov 2011 17:16:49 +0000 (UTC) Received: by elvis.mu.org (Postfix, from userid 1192) id F1D0B1A3C64; Wed, 9 Nov 2011 09:16:48 -0800 (PST) Date: Wed, 9 Nov 2011 09:16:48 -0800 From: Alfred Perlstein To: John Baldwin Message-ID: <20111109171648.GX6110@elvis.mu.org> References: <201110281426.00013.jhb@freebsd.org> <20111109043512.GT6110@elvis.mu.org> <3D0BF37D-0C31-4509-A231-F4D1F81472D8@kientzle.com> <201111090926.19447.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201111090926.19447.jhb@freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: Bruce Cran , Tim Kientzle , Jilles Tjoelker , Ed Schouten , arch@freebsd.org, freebsd-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 17:16:50 -0000 * John Baldwin [111109 07:00] wrote: > 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. Exactly what? All I see you and Tim going back and forth on is that "we can't catch 100% of the cases, so it's best to do nothing". Tim's contrived example of: > > 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. How exactly would a user tell tar(1) to do this on the command line? Would your average user be smart enough to do this? Is it worth making tar's default "blow out all the memory in the box" because of some esoteric use case that you and Tim seem to think exist that has not even been explicitly stated? (seems like you want some command line option to tell tar --only-cache-first-nbytes=#???) Do you realize how ridiculous that sounds? Are all heuristics bad because there's a 1% or 0.1% chance that someone will have a use-case that defeats it? The only sense I can make of your and Tim's argument is a desperate grasp to shut down an idea based on some kind of "I'll back you if you back me no matter how dumb this gets" politics rather than anything that makes sense. I'm going to leave it at politics because I actually thought the two of you were smarter than this and that's the only thing that keeps that assumption working in my head. -- - Alfred Perlstein .- VMOA #5191, 03 vmax, 92 gs500, 85 ch250, 07 zx10 .- FreeBSD committer