From: peltz@cerl.uiuc.edu (Steve Peltz)
Subject: Re: raw disk device
Date: 1996/04/01 [thread overview]
Message-ID: <4jpnjb$9pi@vixen.cso.uiuc.edu> (raw)
In-Reply-To: 4jpgge$hpb@topaz.sensor.com
In article <4jpgge$hpb@topaz.sensor.com>,
Ron Natalie <ron@topaz.sensor.com> wrote:
>First off, you are confusing the terminonlogy. UNIX refers to the
>character device as the RAW device. The block device as the cooked
>device.
My use of "raw" was with regards to disk partitions, i.e. not putting a
file system on it. None of the documentation I've seen has ever used any
special term for the block device other than it being a block device.
The only reference to "cooked" I've ever heard is with regard to tty
devices.
>The RAW device transfers directly from your user memory to the device
>controller. It will always give you the fastest performance if you
>can deal with the constraints involved (alignment/transfer size, etc).
Both the man page (under mknod) and the "Writing Device Drivers" documentation
indicate that "block device drivers are particularly well suited for disk
drives". We aren't running out of CPU time or buffer space, it is just that
the actual write from the buffers to the disk is taking a LONG LONG time,
and that doesn't seem like it ought to happen. We actually do prefer that
the I/O go through a buffer cache so that re-reads of the same location will
not require a physical access. We'd also prefer that the process not need
to wait for a physical write to complete, so the copy to a kernel buffer is
just fine, even if it means a little more CPU time all around to do the
copying. Note that a READ does not take 10 times as long when going through
the block device.
>The COOKED device is buffered through the kernel buffer cache and always
>involves at least one extra copy and perhaps will break your I/O request
>up (you do not have control over it).
Note that the devices that are mounted are the block devices, not the character
devices.
>What makes you think you want to use the block device?
We're putting our own file system on it. We could simply create a 2G file and
read/write to that, but I figured that bypassing the file system would be
somewhat faster.
--
Steve Peltz
tricorn@uiuc.edu
prev parent reply other threads:[~1996-04-01 5:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-03-31 5:00 raw disk device Steve Peltz
1996-03-31 5:00 ` Steve Peltz
1996-04-01 5:00 ` Ron Natalie
1996-04-01 5:00 ` Steve Peltz [this message]
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox