Re: raw devices

2004-08-01 Thread Matthew Seaman
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


pgp0ykp32zI7J.pgp
Description: PGP signature


Re: raw devices

2004-07-31 Thread Matthew Seaman
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

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


pgppniBagdrh3.pgp
Description: PGP signature


Re: raw devices

2004-07-31 Thread Dan Strick
On Sat, Jul 31, 2004 at 10:30:21PM +0200, Wojciech Puchar wrote:

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


and on Sat, 31 Jul 2004 21:45:17 +0100, Matthew Seaman responded:

 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


I checked out the referenced page, which began with something like:

13.5 Block Devices (Are Gone)

   Other UNIX systems may support a second type of disk device known as
   block devices.  Block devices are disk devices for which the kernel
   provides caching.  This caching makes block-devices almost unusable,
   or at least dangerously unreliable.  The caching will reorder the
   sequence of write operations, depriving the application of the ability
   to know the exact disk contents at any one instant in time.  This makes
   predictable and reliable crash ...

I knew that the block devices were gone and that the block device names
now referred to character devices, but I had not examined the reasons for
this or considered the consequences.  Perhaps this explains why old SCSI
disks are such incredibly bad performers under modern FreeBD.  I had just
assumed that the drivers for the old SCSI host adapters had been botched
when rehacked for the new FreeBSD SCSI system and nobody cared because
they were all using modern SCSI host adapters.  The performance of my
old SCSI hardware is so egregiously abysmally atrociously abominably
inexcusably perversely bad that if I had to use it for my primary disk
storage I would now be running Linux instead of FreeBSD.  (Modern ATA
disks seem to work quite well under FreeBSD if you can somehow manage
to avoid ATA controller and cable misconfigurations that drive I/O rates
way down.)

Does anyone know if there are online records of discussions of such
issues?

Dan Strick
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: raw devices

2004-07-31 Thread Kevin D. Kinsey, DaleCo, S.P.
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
   
	Cheers,

	Matthew
 

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?
Kevin Kinsey
DaleCo, S.P.
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]