Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 6da027eb authored by Krishna Kurapati's avatar Krishna Kurapati Committed by Gerrit - the friendly Code Review server
Browse files

net: usbnet: Add mechanism to throttle usb0 RX traffic in USB SS



ECM traffic is non-aggregated which makes it send huge number of
packets in high throughput usecases. This causes the CPU to
dedicate majority of the cycles to ISR context and the softIRQ
contexts stay suspended.

The rx_complete (hardIRQ) keeps adding SKBs to the 'done' list. The
usbnet_bh (tasklet) is supposed to dequeue SKBs from 'done' list and
provide them to NW stack so that they can be consumed. Because of the
above issue, the 'done' list keeps increasing and the system
eventually runs out of memory. When the WD_pet task also does not get
a chance to run because of hardIRQ storm, WD bite is also observed.

Introduce a mechanism to balance the time between hardIRQ and softIRQ
contexts. Add module parameter 'usb0_rx_skb_threshold' to stop the
submission of URBs to HW from the ISR. This will allow the usbnet_bh
to run and consume SKBs, thereby avoiding the OOM scenario and the
WD_pet task also gets a chance to pet the WD. The default value of
this threshold is 500, which can be changed runtime to suit the
requirements according to CPU load.

Since in the failing case, ASIX AX88179/178A USB 3.0/2.0 to Gigabit
Ethernet adapters are being used, throttle handling has been added in
that driver.

Usage:
echo <threshold> > /sys/module/usbnet/parameters/usb0_rx_skb_threshold

Change-Id: I4667f0ad67d5605b132a0e6062be27e01ef75a08
Signed-off-by: default avatarAjay Agarwal <ajaya@codeaurora.org>
Signed-off-by: default avatarKrishna Kurapati <quic_kriskura@quicinc.com>
parent 9927b09f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment