Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Apr 2004 18:14:04 -0700 (PDT)
From:      Julian Elischer <julian@elischer.org>
To:        Matthew Dillon <dillon@apollo.backplane.com>
Cc:        Stephan Uphoff <ups@tree.com>
Subject:   Re: how to flush out cache.? 
Message-ID:  <Pine.BSF.4.21.0404211813150.31770-100000@InterJet.elischer.org>
In-Reply-To: <200404220102.i3M12Lrl097316@apollo.backplane.com>

next in thread | previous in thread | raw e-mail | index | archive | help


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
> 
> 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0404211813150.31770-100000>