From owner-freebsd-current@FreeBSD.ORG Thu Feb 17 22:14:59 2005 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D5D5D16A4CE for ; Thu, 17 Feb 2005 22:14:59 +0000 (GMT) Received: from mail.vicor-nb.com (bigwoop.vicor-nb.com [208.206.78.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8C50A43D1D for ; Thu, 17 Feb 2005 22:14:59 +0000 (GMT) (envelope-from julian@elischer.org) Received: from elischer.org (julian.vicor-nb.com [208.206.78.97]) by mail.vicor-nb.com (Postfix) with ESMTP id 7662F7A403; Thu, 17 Feb 2005 14:14:59 -0800 (PST) Message-ID: <42151763.6050607@elischer.org> Date: Thu, 17 Feb 2005 14:14:59 -0800 From: Julian Elischer User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.3.1) Gecko/20030516 X-Accept-Language: en, hu MIME-Version: 1.0 To: Joseph Koshy References: <1108584730.95661.12.camel@server.mcneil.com> <20050216201716.GA28436@odin.ac.hmc.edu> <4213B3C8.3090508@centtech.com> <1108588393.12275.9.camel@server.mcneil.com> <20050216214031.GA2787@odin.ac.hmc.edu> <4213D3AA.70809@elischer.org> <84dead72050217081540fd7640@mail.gmail.com> In-Reply-To: <84dead72050217081540fd7640@mail.gmail.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: current@freebsd.org Subject: Re: where did all my memory go? (file system cache) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Feb 2005 22:14:59 -0000 Joseph Koshy wrote: >>what I want is: >> >>int fd = open("myfile",...); >>write1GBfiletodisk(fd, data); >>ioctl(fd, PURGEFROMCACHE); >>perform_md5(fd); >> >>and be sure that teh MD5 is that of what is on the disk. >>not what is in RAM. >> >> > >unmount(file-system-of("myfile")) (even if it fails) ? > > I actually heard this trick before.. I can't say I'm enthusiastic about it.. it also forces the flushing of a lot of stuff I may not want to flush, (yet) I don't want to force my other apps to have to reload their cached data. Neat trick though. > > >