lkml.org 
[lkml]   [2004]   [Jun]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Block Device Caching
Timothy Miller wrote:

>
>
> Markus Schaber wrote:
>
>> This lead us to the conclusion that block devices do not cache, but the
>> filesystem does. But subsequently, I ran some tests on my developer
>> machine (Pentium 4 Mobile Laptop).
>
>
>
> I had kernel experts repeatedly insist to me that block devices were
> cached, while all of my tests (using dd to or from, say, /dev/sda1 or
> whatever) indicated that there was absolutely no caching whatsoever.

Well, any cache is dropped when the device is closed. "dd" closes the device
when it finishes.

Try a program that reads the same two blocks (spaced videly apart)
over and over from the same open file descriptor. With _no_ caching
you'll see
the drive seeking all the time. With caching, you won't.

Helge Hafting
-
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/

\
 
 \ /
  Last update: 2005-03-22 14:04    [W:0.061 / U:0.512 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site