Re: lack of raw disk devices

Peter Monta (pmonta@halibut.imedia.com)
Mon, 5 Jan 1998 13:00:47 -0800


> Okay. I've seen this dicussion many times before. I need to know now. What the
> hell is the difference a RAW block device and a (err.... NONRAW?) regular block
> device?

A raw device doesn't go through the buffer cache. For example, if you
issue two reads for the same block, a raw device will physically go
out to disk each time, whereas a buffered device will satisfy the
second request from the cache.

I've read all of the discussion I can find about this, in linux-kernel
archives and elsewhere, and while I don't want to beat a dead horse, I
disagree with those who say raw devices are useless or intrinsically
bad. Granted, the vast majority of the time a buffered device is the
right thing. But I have one application in mind that cries out for a
raw device---it involves moving digital video as fast as possible from
disk to DRAM (and subsequently out to a PCI bus master). The system
will never again need to refer to this data, so a buffered device both
incurs a copying expense (from buffer cache to DRAM buffer) and
trashes the buffer cache to no purpose.

Cheers,
Peter Monta pmonta@imedia.com
Imedia Corp.