Page 1 of 1

dwc_otg interrupt rate

Posted: 07 Oct 2019, 16:56
by Archie
I was looking through some of the processes on my RevPi Connect+ and I noticed the interrupt handler for the dwc_otg driver occurs about 300 times per second. Comparing this to other Pi based devices, the interrupt occurs between 1000 - 8000 times per second. What is different on the Connect+ that reduces this rate so much lower and how do the USB devices continue to work (such as the ethernet ports)?

Re: dwc_otg interrupt rate

Posted: 10 Oct 2019, 03:25
by Archie
I found a setting that affects the dwc_otg interrupt rate. In the file /boot/cmdline.txt , if it contains this "dwc_fiq_enable=N" the interrupt rate approximately triples.

Re: dwc_otg interrupt rate

Posted: 17 Oct 2019, 14:10
by lukas
Archie wrote: 10 Oct 2019, 03:25 I found a setting that affects the dwc_otg interrupt rate. In the file /boot/cmdline.txt , if it contains this "dwc_fiq_enable=N" the interrupt rate approximately triples.
Right, the driver for the USB host controller (dwc_otg) uses the FIQ (Fast Interrupt) to handle the about 8000 SOF interrupts occurring per second, which improves performance. If you disable this feature or use the dwc2 driver instead of dwc_otg, you'll see more interrupts and higher CPU load. The feature was added to the dwc_otg driver by the Raspberry Pi Foundation, however they only added it to the out-of-tree dwc_otg driver, not the dwc2 driver in the mainline kernel. We use the Foundation's kernel as a basis, hence benefit from the feature as well. Unfortunately the Foundation doesn't test it with realtime kernels, so whenever we upgrade to a newer kernel, we have to debug and fix incompatibilities between dwc_otg and the RT patches.

Re: dwc_otg interrupt rate

Posted: 28 Oct 2019, 13:19
by Archie
If I were to build a Kernel using the Kernel Bakery on GitHub and re-flash the Connect+ , would it have the fixes or do those fixes only exist on the factory image?

Re: dwc_otg interrupt rate

Posted: 08 Nov 2019, 13:13
by zhan
Yes, from https://github.com/RevolutionPi you can get the stable version for Connect+, which is revpi-4.9.
The factory image is also built from source code of this repository.
Archie wrote: 28 Oct 2019, 13:19 If I were to build a Kernel using the Kernel Bakery on GitHub and re-flash the Connect+ , would it have the fixes or do those fixes only exist on the factory image?