Re: [QUESTION] bulk out performance

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

 



Thanks for your reply.

2009/3/25 David Brownell <david-b@xxxxxxxxxxx>:
> On Saturday 21 March 2009, Ming Lei wrote:
>> I use g_zero(f_sourcesink configuration) as test device and omap3 musb
>> as UDC, the result
>> of usbtest testcase 5(bulk out) only have ~8MB/s, but testcase 6(bulk
>> in) can reach ~24MB/sec.
>> Why is there so much difference between bulk out and bulk in transfer?
>
> It's been a LONG time since I looked at such issues with
> MUSB hardware, but the short version of the story is that
> the DMA linkage works sanely for TX, much less so for RX.
> That depends a bit on the specific hardware, of course...

I also find such issues in other hardware(surely not use Mentor IP).

>
> Have a look at in drivers/usb/musb/cppi_dma.c under headings
> "CPPI TX" and "CPPI RX Woes".  Its my understanding that very
> similar problems appear with all DMA linkages to that core,
> even ones using Mentor's own DMA (like OMAP3).  Some newer
> parts may have at least partially resolved that, and I know
> Felipe has been working on  this issue (for OMAP3).

I use Mentor's dma and don't enable CPPI, and find the
similar problem with CONFIG_MUSB_PIO_ONLY=y.

I guess the reason is related with PING for the poor bulk out
performance compared with bulk in.   Bulk in transfer can
move data from sdram to udc fifo  before incoming in token, but
bulk out can not receive data in advance, so it is very quick to fill
udc fifo with incoming data  and leads to continuous PING packets
from host until unloading all data from fifo to sdram.

>
> Think of it this way:  "mode 0" DMA is one DMA per packet;
> pretty much at the "why even bother" level.  That's the only
> mode that seems to work well for RX.  While "mode 1" handles
> many packets per DMA transfer ... works well for TX, but for
> RX the *NORMAL* case (transfer terminates by "short packet")
> is not handled well.  (Only the mass storage driver makes a
> habit of using any other transfer termination mode.)
>
> - Dave
>
>



-- 
Lei Ming
--
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