On Fri, Oct 29, 2004, Duncan Sands <[EMAIL PROTECTED]> wrote:
> On Friday 29 October 2004 18:50, Johannes Erdfelt wrote:
> > On Fri, Oct 29, 2004, Duncan Sands <[EMAIL PROTECTED]> wrote:
> > > Hi Johannes, maybe it should allocate multiple pages and then use scatter-gather
> > > io out of them.  That avoids having to allocate large contiguous lumps of kernel
> > > memory, and should also be good for performance.
> > 
> > Are you talking about exporting scatter-gather via usbfs? Or having the
> > kernel avoid a copy from userspace by using scatter-gather internally?
> > 
> > The former might be useful, but only if the application really goes out
> > of the way to use it.
> > 
> > The latter sounds good, but might be tricky. Scatter-gather implies
> > properly sized buffers to ensure the correct packetization, which I
> > don't think userspace could guarantee.
> 
> Neither!  Right now usbfs allocates a buffer (max size: 16k), and copies
> the data from user-space.  The problem is that this requires finding
> several contiguous pages of kernel memory (max: 5 pages).  I'm worried about
> memory pressure here.  If usbfs instead grabbed a bunch of non-contiguous
> pages, copied the data into them from user-space, and then sent it (using
> scatter-gather io), then there is no longer any memory pressure problem.
> What's more, there would also be no reason not to increase the maximum
> data size from 16k to something much bigger, say 256k.  Allowing bigger
> buffers should increase performance.

Duh, that would be the obvious way to increase performance and
reliability.

Not to mention it should be relatively easy to implement.

JE



-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to