Re: How much control does a block driver have over the buffer cache?
On Wed, Jul 13, 2011 at 07:30, Neil Baylis neil.bay...@gmail.com wrote: For example, would it be possible to create a block driver that does not use the buffer cache? I think the answer must be 'no' because the caching happens before the block driver gets any requests to move data. something like dd iflag=direct or oflag=direct does? btw, you are still under effect of hardware cache installed in the hard disk itself...so what you see is actually IMHO a cumulative effect of caching happen in the entire system -- regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
How much control does a block driver have over the buffer cache?
I'm trying to clarify my picture of how the buffer cache works. I notice that if I do the following: dd if=/dev/sda7 of=/dev/null bs=10k count=100 The first time will be slow, and the second and subsequent times will be very fast because the data are now in the buffer cache. However, this is only true if there's a filesystem mounted on the device. This leads me to think of the buffer cache as associated with the filesystem rather than the device. For example, would it be possible to create a block driver that does not use the buffer cache? I think the answer must be 'no' because the caching happens before the block driver gets any requests to move data. ___ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies