Subject: Re: Speed...
To: Johnny Billquist <bqt@update.uu.se>
From: Thor Lancelot Simon <tls@rek.tjls.com>
List: port-vax
Date: 03/17/2003 11:59:24
On Mon, Mar 17, 2003 at 05:08:06PM +0100, Johnny Billquist wrote:
> 
> Hmmm, maybe I didn't express myself that good.
> Of course data is DMAs directly into the cache page.
> What I was wondering was when you have a cache hit. The read don't
> generate a controller action, and no DMA activity occurs. Do we have the
> same amount of memory copying as if we have a cache miss then there isn't
> much to argue about.

It has *never* been the case with the BSD kernel that user read()/write()
I/O requests were serviced by DMA into userspace.  If you think about it,
there are some very good reasons why this is Hard.  In the modern NetBSD
kernel we at least have a framework for doing such direct DMA, but the
constraints are such that it can't really be used for read()/write(), at
least not with traditional Unix semantics (one particularly sticky issue
is what to do if there's an I/O error that you don't discover until a page
fault causes the I/O to actually be done, at which point you've clobbered
the user's buffer).

Thor