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

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

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

    MS_INVALIDATE doesn't do that.  

    madvise()'s MADV_FREE does what you want, BUT it does not currently 
    work (at least on 4.x or in DFly) on file-backed data, it only works
    with anonymous memory.  I believe that on some systems MADV_FREE does
    what you expect, e.g. like on Solaris (though I am not 100% sure), so
    it would not be far-fetched to go and implement it.

					-Matt
					Matthew Dillon 
					<dillon@backplane.com>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200404220140.i3M1e9l9097495>