usb: dwc3: bulk out endpoint optimization using CSP
For bulk transfers, the current implementation uses TRB allocation "on demand". That is, it receives an XferNotReady event as the trigger to prepare an array of TRBs to use for the upcoming transfer, with the last TRB set with the LST bit which will trigger an XferComplete event. A transfer, in many cases, consists of small packets. As such, for each of the TRBs set up an XferComplete event is received. This results in thousands of interrupts a second and a high CPU usage. The optimization sets the CSP (continue on short packet) bit for all the TRBs set up for the transfer to avoid those notifications, and relies on the XferComplete event of the last TRB to denote the end of the transfer, reducing the number of interrupts by orders of magnitude to several dozens. To avoid potential starvation when small number of packets are transfered a timer is added to notify on completed TRBs that are pending. By default this optimization is disabled and below module param should be used to enable it: echo timer_freq_msec > /sys/module/dwc3/parameters/bulk_ep_xfer_timeout_ms By default it is set to 0. Change-Id: Ibd7ed518ef0f5100e1d1ed06fa3abb228af8706e Signed-off-by:Gilad Broner <gbroner@codeaurora.org> Signed-off-by:
Ido Shayevitz <idos@codeaurora.org> Signed-off-by:
Manu Gautam <mgautam@codeaurora.org>
Loading
Please register or sign in to comment