Messages in this thread |  | | | Date | Thu, 29 Jul 2004 11:05:46 +1000 | | From | Nathan Scott <> | | Subject | Re: clearing filesystem cache for I/O benchmarks |
| |
On Mon, Jul 26, 2004 at 11:40:05PM -0700, Andrew Morton wrote: > ... > However... If you write any amount of data to a file with O_DIRECT, that > will, as a side-effect, remove _all_ of that file's pagecache. In 2.4 as > well as 2.6. So you could scrub the pagecache by reading the first 4k then > writing it back with O_DIRECT. > > However O_DIRECT is supported on very few filesystems in 2.4. ext2 and > reiserfs have it. > > XFS in 2.4 has O_DIRECT, I think, but I don't know if the invalidation > side-effect works on XFS.
Yep, it does.
cheers.
-- Nathan - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |