From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 21 18:14:09 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F3C3A16A4CE for ; Wed, 21 Apr 2004 18:14:08 -0700 (PDT) Received: from sccrmhc13.comcast.net (sccrmhc13.comcast.net [204.127.202.64]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6FBD443D5C for ; Wed, 21 Apr 2004 18:14:08 -0700 (PDT) (envelope-from julian@elischer.org) Received: from interjet.elischer.org ([24.7.73.28]) by comcast.net (sccrmhc13) with ESMTP id <2004042201140601600d3ffre>; Thu, 22 Apr 2004 01:14:07 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id SAA36944; Wed, 21 Apr 2004 18:14:05 -0700 (PDT) Date: Wed, 21 Apr 2004 18:14:04 -0700 (PDT) From: Julian Elischer To: Matthew Dillon In-Reply-To: <200404220102.i3M12Lrl097316@apollo.backplane.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: hackers@freebsd.org cc: Stephan Uphoff Subject: Re: how to flush out cache.? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Apr 2004 01:14:09 -0000 On Wed, 21 Apr 2004, Matthew Dillon wrote: > : > :> > :> mmap() and msync(..MS_INVALIDATE..) should work. > : > :hmmm that is rather interesting.. > :I wonder if it would work.... > :Maybe a vm guru could confirm this.. (under 4.x) > : > > Huh. If I hadn't looked at the code I would have said that > MS_INVALIDATE doesn't work in FreeBSD, but when I look at the code > it sure looks like it ought to work! > > But, alas, it does not. The invalidation request goes all the way > through to the vnode pager but it looks like the vnode pager ignores > it. > > MS_INVALIDATE -> OBJPC_INVAL -> VM_PAGER_PUT_INVAL -> IO_INVAL -> (ignored) > > IO_INVAL is defined to be 'invalidate after I/O completes', > not 'throw away the dirty data', but the only place it appears to be > implemented is in the NFS code. Actually what I'm looking for is "throw away clean data" I want to dump the cached version of a file so that I can force a reread of the disk. > > -Matt > >