From owner-freebsd-questions Wed Jul 4 17:19:27 2001 Delivered-To: freebsd-questions@freebsd.org Received: from yonge.cs.toronto.edu (yonge.cs.toronto.edu [128.100.1.8]) by hub.freebsd.org (Postfix) with SMTP id 0969D37B403; Wed, 4 Jul 2001 17:19:22 -0700 (PDT) (envelope-from khui@cs.toronto.edu) Received: from jane.cs.toronto.edu ([128.100.2.31]) by yonge.cs.toronto.edu with SMTP id <33977-24778>; Wed, 4 Jul 2001 20:19:05 -0400 Received: from gardiner.cs.toronto.edu by jane.cs.toronto.edu id <453139-28524>; Wed, 4 Jul 2001 20:19:01 -0400 Date: Wed, 4 Jul 2001 20:18:51 -0400 From: Kevin Hui X-Sender: khui@gardiner.cs To: "Kenneth D. Merry" Cc: freebsd-questions@FreeBSD.ORG, freebsd-hackers@FreeBSD.ORG Subject: Re: Raw disk access in userland In-Reply-To: <20010704170844.A47113@panzer.kdm.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Then the question is whether the kernel is copying data between userspace and kernelspace or whether it just DMAs the data straight in/out of the user program's address space. In Linux raw-io, given that it is a block device and you are doing page-aligned block I/Os on it, is smart and does zero copies. While it may seem to be jumping through hoops, maybe it does have a performance advantage? Regards, -Kevin. On Wed, 4 Jul 2001, Kenneth D. Merry wrote: > On Wed, Jul 04, 2001 at 17:58:58 -0400, Kevin Hui wrote: > > Hi all, > > > > I'm wondering if *BSD have any support for user programs to access raw > > disk devices, unbuffered. Such support is available under Linux: > > > > http://www.kernel.org/LDP/HOWTO/SCSI-2.4-HOWTO/rawdev.html > > http://www2.linuxjournal.com/cgi-bin/linux/man.cgi?mode=search&comm=raw§=1 > > > > Any information regarding this would be appreciated. > > There are no block (i.e. buffered) devices in FreeBSD, only character > devices. > > So you can access raw devices without having to go through all the hoops > described above. > > Ken > -- > Kenneth Merry > ken@kdm.org > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message