Re: disk benchmarks & linux

David S. Miller (
Sun, 14 Sep 1997 01:42:27 -0400

Date: Sat, 13 Sep 1997 22:31:21 -0700
From: Larry McVoy <>

So I'm polishing up yet another whizzy benchmark and I'm getting
screwed, somewhat, by the fact that Linux doesn't have raw devices
so the buffer cache can throw me off when I'm doing I/O on /dev/sda
or something similar.

Is there any way to force the data out of the cache other than to
try and use up all of memory?

void flush_buffer_cache(int device_fd)
int err;

err = ioctl(device_fd, BLKFLSBUF, 0);
if(err < 0)

David "Sparc" Miller