Page 1 of 1

High Load when reading from virtual COM port

Posted: 18 Oct 2024, 10:53
by lifthanger
Dear KUNBUS-Support,

I'm using a RevPI Connect 4 with the most recent stable Image and and up-to-date system and kernel.
My application reads about 250kB/s from a device that presents as a virtual COM port over USB.

dmesg - snippet

Code: Select all

[ 6809.763018] usb 1-2: new full-speed USB device number 6 using xhci_hcd
[ 6810.170930] usb 1-2: Product: STM32 Virtual ComPort
[ 6810.170931] usb 1-2: Manufacturer: STMicroelectronics
[ 6810.189710] cdc_acm 1-2:1.0: ttyACM0: USB ACM device
This leads to a very high CPU load and subsequent data loss because of the process "irq/34-xhci_hcd" similar to viewtopic.php?t=4225. Interrupts caused by xhci are about 45000 per second.

With piControl already disabled and without desktop environment running, the system load averages at about 3.2 while reading from USB.
On a standard raspberry pi 4b with Raspberry Pi OS the same application averages a load of about 1.0.

I wanted to try the 6.6 Kernel using the instructions for 6.1 from your kernelbakery, but the Makefile seems to be missing a target.

Unfortunately the RevPi would not be usable for my application in this state.
Is there some way to mitigate this problem?
Thanks!

Re: High Load when reading from virtual COM port

Posted: 12 Nov 2024, 10:35
by dirk
Hello lifthanger, I am interested to seeing your message. Now the new RevPi Bookworm OS has been released, see here.

Can you test your setup again with the new RevPi Bookworm OS?

Re: High Load when reading from virtual COM port

Posted: 19 Nov 2024, 11:16
by lifthanger
Hello Dirk,

thank you for your message.
We tried the new image as soon as it was released, but observed the same problem unfortunately.
For now we're using the standard Raspberry Pi OS (bookworm) on the RevPi Connect 4, which seems to work fine.
Is there any downside in using the official image on the RevPi?
Thanks!