Re: Raw disk access in userland
On Wed, Jul 04, 2001 at 23:42:50 -0700, Mike Smith wrote: > > On Wed, Jul 04, 2001 at 20:18:51 -0400, Kevin Hui wrote: > > > 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? > > > > The kernel copies between userland and the kernel. > > Er, no. > > See sys/kern/kern_physio.c for the details. *hits head* I (of all people) should have remembered that. I wrote the zero copy stuff for the pass(4) driver (see cam_periph_mapmem() in sys/cam/cam_periph.c) using physio as a model. Ken -- Kenneth Merry [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Raw disk access in userland
> On Wed, Jul 04, 2001 at 20:18:51 -0400, Kevin Hui wrote: > > 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? > > The kernel copies between userland and the kernel. Er, no. See sys/kern/kern_physio.c for the details. -- ... every activity meets with opposition, everyone who acts has his rivals and unfortunately opponents also. But not because people want to be opponents, rather because the tasks and relationships force people to take different points of view. [Dr. Fritz Todt] V I C T O R Y N O T V E N G E A N C E To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Raw disk access in userland
On Wed, Jul 04, 2001 at 20:18:51 -0400, Kevin Hui wrote: > 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? The kernel copies between userland and the kernel. Ken -- Kenneth Merry [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Raw disk access in userland
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 > [EMAIL PROTECTED] > To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Re: Raw disk access in userland
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 [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
Raw disk access in userland
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. Regards, -Kevin. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message