Subject: Re: bypassing system cache?
To: Emmanuel Dreyfus <>
From: Manuel Bouyer <>
List: tech-kern
Date: 12/10/2007 11:12:47
On Mon, Dec 10, 2007 at 09:39:05AM +0000, Emmanuel Dreyfus wrote:
> Hello
> I suspect I have a faulty disk controller. I would like to test that by
> looping on writes and reads, and checking I get what I have poked on the
> disk.
> The problem is to avoid the system cache. As I understand, a call to fsync(2)
> will ensure the data get pushed to the disk controller. How do I avoid the
> read operations from being done from the system cache instead of from the 
> disk controller?

For testing the controller you can use the character disk device; access
on this one don't go through the system cache.

Manuel Bouyer, LIP6, Universite Paris VI. 
     NetBSD: 26 ans d'experience feront toujours la difference