raw devices

Matthew Seaman m.seaman at infracaninophile.co.uk
Sun Aug 1 03:09:39 PDT 2004


On Sat, Jul 31, 2004 at 10:25:40PM -0500, Kevin D. Kinsey, DaleCo, S.P. wrote:
> Matthew Seaman wrote:

> >On Sat, Jul 31, 2004 at 10:30:21PM +0200, Wojciech Puchar wrote:

> >>where are raw devices in FreeBSD? do they exist at all?

> >Actually, all devices under FreeBSD are raw or character devices.
> >Block devices on the other hand disappeared a long time ago.  It's all
> >to do with having an advance VM system, apparently:
> >
> >   http://www.freebsd.org/doc/en_US.ISO8859-1/books/arch-handbook/driverbasics-block.html
 
> Hmm, now I'm a tad curious --- or confused.  ceri@ just committed a
> revised synopsis I hacked at for the handbook's Vinum chapter which
> states, among other things:
> 
>    "In addition to supporting various cards and controllers for hardware
>    RAID systems, the base FreeBSD system includes the Vinum Volume
>    Manager, a block device driver that implements virtual disk drives."
> 
> So is there conflicting data here?  Might be good to figure out the
> truth before the next edition handbook goes to the printer (which may be 
> soon...)
> 
> However, I'd be first to admit a dire lack of knowledge here... help?

I think the point is not that a FreeBSD system never communicates with
any device in "block mode", but that there's no exposure of that
interface outside of the kernel.

The original BSD distinction between character and block devices let
people achieve a degree of optimization in certain circumstances by
short circuiting the bufferring etc. involved in using a character
device and interacting more directly with the hardware.

However, that concept was first developed probably some twenty-odd
years ago, and the state of the art in disk and virtual memory
technology has come on a long way since then.  Nowadays, short
circuiting the higher levels of buffer caching just doesn't make
sense.  Let the VM system choose when to push blocks of data out to
the disks or pseudo-disks (ie. RAID arrays, vinum devices etc), or
when to read them in.  It knows best.

	Cheers,

	Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey         Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20040801/4112a7b1/attachment.bin


More information about the freebsd-questions mailing list