RE: [PATCH] usb/gadget: let file storage gadget select libcomposite

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 31 Oct 2012, Paul Zimmerman wrote:

> > From: Michal Nazarewicz [mailto:mpn@xxxxxxxxxx] On Behalf Of Michal Nazarewicz
> > Sent: Wednesday, October 31, 2012 1:10 PM
> > 
> > On Wed, Oct 31 2012, Paul Zimmerman wrote:
> > > Regarding that, would you guys accept a patch that adds the "buflen"
> > > module parameter to the mass-storage gadget? Without increasing the
> > > buffer length above 16K, it's impossible to approach the max throughput
> > > allowed by SuperSpeed hosts.
> > 
> > I have no problem with that.  But did you try setting up 4 buffers?  you
> > can set number of buffers g_{file,mass}_storage uses with config
> > USB_GADGET_STORAGE_NUM_BUFFERS (or if you select USB_GADGET_DEBUG_FILES
> > you get a fsg_num_buffers module parameter).
> 
> Yeah, I tried that, but it didn't have much effect. Whereas increasing num_buffers
> to 4 and buffer length to 128K gives a large improvement, from less than 200 MB/s
> to about 290 MB/s.

No doubt this is a matter of interrupt latency.  I don't know the
maximum throughput for SuperSpeed bulk data, so I'll guess it's about 8
times that of high speed (500 MB/s vs. 480 Mb/s).  High speed bulk data
can be transferred at rates up to 6.5 KB/uframe (although the values
one sees in practice are almost never that high).  This means
SuperSpeed bulk data can be transferred at rates up to 52 KB/uframe.  
Assuming we get completion interrupts only at microframe boundaries,
bulk data buffers should be at least 64 KB, and preferably larger.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux