lkml.org 
[lkml]   [1998]   [Jan]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 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?

Depends on whom you talk to :-) In a traditional (BSD style?) raw
device, read/write-operations from/to a raw device do not use the
disk cache. This has two effects:
- repeated disk access to the same location is slower
- if the system crashes, there are no unflushed buffers
- memory consumption is lower
(well, that's three effects). Linux supports only the second one.

Database implementors are especially interested in the second
property, as it is a pre-requisite for safe transactions: the DB needs
to know that the data is really on the disk when the write(2) call
returns, so that recovery can occur should the system fail later.

Even though you cannot disable the read cache in Linux, you can have
the second of these properties, by given O_SYNC to the open(2) call.
So you can disable the write caching if you want. There seems some
dissense whether applications want to disable the read cache as well.

Hope this helps,
Martin

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