Discussion:
[linux-uvc-devel] High CPU usage when streaming on 3.17.8 kernel with DMA enabled
Tom Mises
2015-05-12 20:12:59 UTC
Permalink
I am running 3.17.8 kernel with DMA enabled on TI DM3730 (Gumstix
Overo Firestorm-P COM). When streaming frames in mmap mode, I am
seeing very high CPU usage, up to 70%. This CPU usage is reported to
be in software interrupts. The captured frames are NOT corrupted.

Interestingly, when running 3.5 kernel, with DMA enabled as well, the
CPU usage is 30% and it is reported to be mostly in the user space.

Neither of these results are satisfactory, I hoped DMA would take care
of the data transfer and the CPU resources would be available to run
data processing.

I used the video capture example from the V4L2 API documentation. This
behavior was tested and observed for two different cameras, one of
them working in isochronous mode, the other working in bulk mode.
Interrupts showing activity during the streaming are: omap-dma-engine,
ehci_hcd:usb1.

Perhaps, the problem is somewhere in the interaction between the UVC
driver and the DMA driver. I am aware this is a somewhat vague
description unfortunately, but I am not sure what other detail would
be helpful. UVC debugging messages do not show anything unusual.
Beyond that, debugging these drivers on my own exceeds my expertise,
so I will welcome any suggestions.

Thanks,

Tom
Tom Mises
2015-05-12 22:49:16 UTC
Permalink
I have just run another test with very low resolution and fps
settings, 160x90 5ps YUV422. In that case, on 3.5 kernel, CPU usage is
very low. However, on 3.17.8 kernel, it is still similar as before,
around 60% and all in software interrupts; it drops to zero
intermittently this time.

Tom
Post by Tom Mises
I am running 3.17.8 kernel with DMA enabled on TI DM3730 (Gumstix
Overo Firestorm-P COM). When streaming frames in mmap mode, I am
seeing very high CPU usage, up to 70%. This CPU usage is reported to
be in software interrupts. The captured frames are NOT corrupted.
Interestingly, when running 3.5 kernel, with DMA enabled as well, the
CPU usage is 30% and it is reported to be mostly in the user space.
Neither of these results are satisfactory, I hoped DMA would take care
of the data transfer and the CPU resources would be available to run
data processing.
I used the video capture example from the V4L2 API documentation. This
behavior was tested and observed for two different cameras, one of
them working in isochronous mode, the other working in bulk mode.
Interrupts showing activity during the streaming are: omap-dma-engine,
ehci_hcd:usb1.
Perhaps, the problem is somewhere in the interaction between the UVC
driver and the DMA driver. I am aware this is a somewhat vague
description unfortunately, but I am not sure what other detail would
be helpful. UVC debugging messages do not show anything unusual.
Beyond that, debugging these drivers on my own exceeds my expertise,
so I will welcome any suggestions.
Thanks,
Tom
Jayakrishnan M
2015-05-14 13:57:18 UTC
Permalink
Hi Tom,
Post by Tom Mises
I am running 3.17.8 kernel with DMA enabled on TI DM3730 (Gumstix
Overo Firestorm-P COM). When streaming frames in mmap mode, I am
seeing very high CPU usage, up to 70%. This CPU usage is reported to
be in software interrupts. The captured frames are NOT corrupted.
<snip>
Post by Tom Mises
Perhaps, the problem is somewhere in the interaction between the UVC
driver and the DMA driver.
Perhaps the problem could be in the USB driver for the platform. USB
driver handles the data transfer part. Does 3.17.8 have any new
options for USB driver?

Regards,
Jayakrishnan

Loading...