dwc_otg interrupt rate

Topics about the Software of Revolution Pi
Post Reply
Archie
Posts: 8
Joined: 25 Jul 2019, 15:50

dwc_otg interrupt rate

Post 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)?
Archie
Posts: 8
Joined: 25 Jul 2019, 15:50

Re: dwc_otg interrupt rate

Post 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.
User avatar
lukas
Expert
Posts: 186
Joined: 13 Feb 2017, 10:29

Re: dwc_otg interrupt rate

Post 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.
Archie
Posts: 8
Joined: 25 Jul 2019, 15:50

Re: dwc_otg interrupt rate

Post 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?
zhan
Posts: 52
Joined: 16 Apr 2019, 13:31

Re: dwc_otg interrupt rate

Post 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?
Simon
Post Reply