From owner-freebsd-questions Wed Jul 4 23:34:53 2001 Delivered-To: freebsd-questions@freebsd.org Received: from panzer.kdm.org (panzer.kdm.org [216.160.178.169]) by hub.freebsd.org (Postfix) with ESMTP id 8240B37B401; Wed, 4 Jul 2001 23:34:48 -0700 (PDT) (envelope-from ken@panzer.kdm.org) Received: (from ken@localhost) by panzer.kdm.org (8.9.3/8.9.1) id AAA49055; Thu, 5 Jul 2001 00:34:47 -0600 (MDT) (envelope-from ken) Date: Thu, 5 Jul 2001 00:34:47 -0600 From: "Kenneth D. Merry" To: Mike Smith Cc: Kevin Hui , freebsd-questions@FreeBSD.ORG, freebsd-hackers@FreeBSD.ORG Subject: Re: Raw disk access in userland Message-ID: <20010705003447.A49002@panzer.kdm.org> References: <20010704211233.A48146@panzer.kdm.org> <200107050642.f656gox00974@mass.dis.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: <200107050642.f656gox00974@mass.dis.org>; from msmith@FreeBSD.ORG on Wed, Jul 04, 2001 at 11:42:50PM -0700 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 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 ken@kdm.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message