Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 09 Jan 1998 23:36:05 -0700
From:      "Justin T. Gibbs" <gibbs@plutotech.com>
To:        Curt Sampson <cjs@portal.ca>
Cc:        David Greenman <dg@root.com>, "Justin T. Gibbs" <gibbs@plutotech.com>, alpha@FreeBSD.ORG
Subject:   Re: Alpha port.. 
Message-ID:  <199801100638.XAA25199@pluto.plutotech.com>
In-Reply-To: Your message of "Fri, 09 Jan 1998 19:01:27 PST." <Pine.NEB.3.96.980109190034.11650B-100000@critic.cynic.net> 

next in thread | previous in thread | raw e-mail | index | archive | help
>On Fri, 9 Jan 1998, David Greenman wrote:
>
>>    Does this make my position any more clear?
>
>Yes. Thanks. I'm aware that I might have been misinterpreting you;
>it was only an oral conversation, and that was a while ago. Though
>I confess I don't really see the performance issues involved.

There are six things that I changed in the bus_space/dma area when
I implemented them for FreeBSD all stemming from performance issues
are:

1) I made it possible for a driver to be compiled without support for
   all bus_space tag types.  For devices that can only perform
   one access type, this removes the need to do any comparisions on
   the tag at all (at least in the x86 implementation) and the performance
   is exactly the same as with the old inb/outb interface.

2) For devices/configurations where no special treatment is required
   to setup/manage dma operations no additional space for bus dma handles
   is required.  The client still needs to allocate space for an
   opaque type, that happens to be a pointer, for each handle, but that
   pointer will end up being NULL.

3) bus dma operations are completed through a software interrupt driven
   callback mechanism which allows for you to lazily allocate resources
   and even limit the amount of pages allocated for the bounce pool to
   be less than the total that might possibly be needed at one time.
   On my 32MB system running a tagged queuing capable ISA SCSI adapter
   under heavy load, I never saw even 128K of bounce pages in use at a
   given time.  Allocating the 1MB that NetBSD does for ISA 1542 support
   is a waste of memory.

4) Bouncing is done on a per-page basis instead of requiring each transaction
   to be completely copied into a 64K chunck of contiguous memory even if
   only a single page requires bouncing.

5) There is a complete "inheretence tree" from root bus down to device
   of dma requirements so that a broken PCI device can properly specify
   additional restrictions on it's transfers above and beyond any imposed
   by it's parent bus (or the parent's, parent, etc.).

6) Bounce ranges can optionally be specified by a "filter function".  This
   works great for devices like the early Buslogic 445S which really only
   need to bounce a select few pages in the system which aren't easily
   represented in another fashion.

Even with these changes, the implementation isn't complete.  It
really needs to have support for generic data coalessing so that
we can handle large block transfers to controllers with a shortage
of SG segments (for reading large blocked tapes primarily) as well
have it transparantly and effeciently handle bouncing of objects
that are much smaller than a page size (like ccbs).  I have ideas
on how to do both of these things, some of which are partially
reflected in the code I've already written, but I need to find some
additional time to finish this stuff up.

>cjs
>
>Curt Sampson    cjs@portal.ca	   Info at http://www.portal.ca/
>Internet Portal Services, Inc.	   Through infinite mist, software reverberates
>Vancouver, BC  (604) 257-9400	   In code possess'd of invisible folly.

--
Justin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199801100638.XAA25199>