Date: Wed, 9 Nov 2011 09:16:48 -0800 From: Alfred Perlstein <alfred@freebsd.org> To: John Baldwin <jhb@freebsd.org> Cc: Bruce Cran <bruce@cran.org.uk>, Tim Kientzle <tim@kientzle.com>, Jilles Tjoelker <jilles@stack.nl>, Ed Schouten <ed@80386.nl>, arch@freebsd.org, freebsd-arch@freebsd.org Subject: Re: [PATCH] fadvise(2) system call Message-ID: <20111109171648.GX6110@elvis.mu.org> In-Reply-To: <201111090926.19447.jhb@freebsd.org> References: <201110281426.00013.jhb@freebsd.org> <20111109043512.GT6110@elvis.mu.org> <3D0BF37D-0C31-4509-A231-F4D1F81472D8@kientzle.com> <201111090926.19447.jhb@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
* John Baldwin <jhb@freebsd.org> [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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20111109171648.GX6110>