RFC: invalidateCaches(fd) interface

Larry McVoy (lm@bitmover.com)
Sat, 06 Mar 1999 11:38:34 -0800


I've been unable to find an interface in Linux which will flush just a
single file's data from the buffer/page cache[s]. I used to do this on
Sun's with an mmap() and then an msync(MS_INVALIDATE) but that doesn't
seem to work in Linux. Does anyone have a patch to do this and would there
be any interest in a /proc interface to do this? I'd like to be able to
do

echo /home/lm/tmp/BIGFILE > /proc/invalidate

and have it do it. It makes for a nice interface for shell scripts.

By the way, the reason I want this is kernel related, believe it or not.
I've got scripts which convert linux kernel tarballs into BitKeeper
repositories and I'd like to flush the tarball from the cache after I've
untarred it - it tends to sit around and be a waste of memory.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/