Hi Roman,

> David Brownell wrote:
> > 
> > For OHCI another way to solve the done_list bus_to_virt isssue:
> > 
> > ...
> >     td = ohci->dma_hash[(dma>>SOME_SHIFT)%TD_HASH_SIZE];
> > ...
> > 
> > Hashes maintained in td_alloc and td_free.  Seems familiar.
> > Brad, Steve -- that kind of thing?  It'd be great to see a patch
> > along these lines.  I think Roman's right: most systems won't
> > have many tds active at a time.  Usually one td per urb.
> > 
> Ok, thats a good starting point, but I also like Alans idea
>  to hash just the page addresses.

The question in my mind is what gets hashed to what.  The snippet
I sent along hashes dma addresses into a (sparse) hashtable of TDs
(then chains the collisions).  Fast enough; though there's a space
penalty (extra driver data, making up for no bus_to_virt analogue).

Hashing dma addresses to pages makes sense to me only inside
the allocator, which knows how these blocks are assigned to pages,
and what pages really exist.  But maybe someone else can show
me a place outside an allocator which can maintain that data reliably,
and with less cost, than either of the solutions I've proposed so far.
(One within the allocator using page-level smarts, and this more
recent one outside.)

- Dave




_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
http://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to