contiguous memory allocation problem

Hans Petter Selasky hselasky at
Sun Jul 2 09:38:08 UTC 2006

On Saturday 01 July 2006 21:44, David Malone wrote:
> On Sat, Jul 01, 2006 at 10:44:54AM +0200, Hans Petter Selasky wrote:
> > > The latest concensus seems to be that the USB system should make use of
> > > the scatter-gather facilities in the hardware to avoid the need to
> > > allocate large contiguous memory chunks.  iedowse@ had mostly finished
> > > implementing this in mid May.
> >
> > Yes, but scatter and gather will add extra complexity to the driver, and
> > maybe an extra memory copy in most cases. The idea is to allocate less
> > than or equal to a page of memory, and then avoid the problem?
> I believe the USB drivers in -current grew scatter/gather support
> about a month ago. See the commit message below. Is this likely to
> help?

I see.

But there is one problem, that has been overlooked, and that is High speed 
isochronous transfers, which are not supported by the existing USB system. I 
don't think that the EHCI specification was designed for scatter and gather, 
when you consider this:

8 transfers of 0xC00 bytes has to fit on 7 pages. If this is going to work, 
and I am right, one page has to contain two transfers. (see page 43 of 

Currently the PAGE_SIZE is 0x1000, right? As you can see "(0xC00 * 2) > 

So is it possible to change the PAGE_SIZE ?


More information about the freebsd-hackers mailing list