High CPU load produced by USB (DW2)

Minas Harutyunyan Minas.Harutyunyan at synopsys.com
Thu Feb 15 21:59:18 PST 2018


On 2/15/2018 5:20 PM, Mirza Krak wrote:
> On 14 February 2018 at 13:07, Minas Harutyunyan
> <Minas.Harutyunyan at synopsys.com> wrote:
>> On 2/14/2018 12:57 PM, Mirza Krak wrote:
>>> On 8 February 2018 at 14:53, Minas Harutyunyan
>>> <Minas.Harutyunyan at synopsys.com> wrote:
> 
> < snip >
> 
>>
>> I reviewed your interrupt count log again. About 140,000 interrupts in 2
>> seconds, obviously it's not SOF only interrupts. More probably, its NAK
>> respond interrupts to SSPLIT/CSPLIT transactions. For this case I can
>> recommend you to apply patch from Douglas Anderson: "[PATCH v2] usb:
>> dwc2: host: Don't retry NAKed transactions right away" which already
>> merged to 4.16-rc1.
>>
>> In your setups you see different behavior on different HUBs. Your HUBs
>> have different "TT think time": 8 and 32. In USB2.0 spec "TT think time"
>> described as follow "TT requires at most 8/32 FS bit times of inter
>> transaction gap on a full-/low-speed downstream bus". So, your "worst"
>> HUB with "TT think time"=8 sending more frequently SSPLIT/CSPLIT
>> transactions which replied by NAK. As result you see about 4 time more
>> interrupts comparing to "good" HUB. Could you please check interrupts
>> count for "good" HUB and check "4 time" hypothesis.
> 
> Did some further testing. The "good" HUB is actually as bad as the
> "bad" HUB, and it was my setup that caused the different behavior. Did
> not use the same devices etc.
> 
> Once I made sure that the configuration and setup was the same on both
> board I could see that the behaved similarly. And that is the
> following interrupt load:
> 
> - BT USB (FS) = ~80k interrupts / second
> - Keyboard (FS) = ~80k interrupts / second
> - WiFI USB (HS) = ~8k interrupts / second
> 
> After applying the suggested patch [1], it is steady around 8k
> interrupts / second no matter what device I connect (HS/FS,
> HUB/NO-HUB). Which is acceptable and usable.

Great!
> 
> Should this patch be a candidate for stable? Because in the current
> state, this combination DWC2 + HS HUB + FS device, is not "usable".
> 
Ask the author of patch or dwc2 maintainer.

Thanks,
Minas


> [1]. https://urldefense.proofpoint.com/v2/url?u=https-3A__git.kernel.org_pub_scm_linux_kernel_git_torvalds_linux.git_commit_drivers_usb_dwc2-3Fh-3Dv4.16-2Drc1-26id-3D38d2b5fb75c15923fb89c32134516a623515bce4&d=DwIFaQ&c=DPL6_X_6JkXFx7AXWqB0tg&r=6z9Al9FrHR_ZqbbtSAsD16pvOL2S3XHxQnSzq8kusyI&m=5Np0whDSSNNvE3TAVBpFa0JUmvQbS3qWdpC0PQssosY&s=CYTOKYUsKlYbJKodeDN_ZybQpBL0ULIyf2Y_MeZgV30&e=
> 




More information about the Linux-rockchip mailing list