how to flush out cache.?
Matthew Dillon
dillon at apollo.backplane.com
Wed Apr 21 18:40:14 PDT 2004
: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 at backplane.com>
More information about the freebsd-hackers
mailing list