RE: lack of raw disk devices

jhohertz@golden.net (PetruccJ@kochind.com)
Mon, 5 Jan 1998 16:25:57 -0600


Another reason for raw devices:

Because raw devices don't go through the buffered cache they are safer
to use for some databases. The fact that when you write to a device you
know its going to a physical write instead of cache makes data integrity
much safer if the system goes down without flushing its cache on a
filesystem you can't tell if all you changes to the database (even if
you committed them) were physically written.

> -----Original Message-----
> From: Peter Monta [SMTP:pmonta@halibut.imedia.com]
> Sent: Monday, January 05, 1998 3:01 PM
> To: jhohertz@golden.net
> Cc: h.milz@seneca.muc.de; linux-kernel@vger.rutgers.edu
> Subject: Re: lack of raw disk devices
>
> > 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.