data throttling under load when serial to usb adapter is used

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 






Hi,
 under load I am experiencing data throttling when serial to usb adapter is used,
but only in direction from wires to usb. Opposite direction seems to be robust.
 To reproduce plug both ends of usb to serial adapter into same hardware and run
attached script. You should see data flowing in both directions, then saturate cpu
`stress --cpu #cpus_plus_two`.
 Data will be corrupted only in serial to usb direction, usually from beginning,
often within first urb. Not seems to be due to flow control.
 Even though chopped bytes are received, rx/tx counters are correctly incremented.
Script implements data sending in two ways, first utilizing socat and second standard
cat command. It is adjusted for RPi4 with miniUART ttyS0, for multiport hardware
and/or ttyAMA0 you will need to tailor accordingly.

Rough failure rates observed (former trials with ~32k dmesg):
ttyAMA0: 'cat' 20% vs. 'socat'  2%
ttyS0  : 'cat' 90% vs. 'socat' 40%

Why to plug both adapter ends into same hardware?
- I believe this is sub-issue of two connected devices, but it is hard to reproduce
- serial port programming




Regards,
Filip Zaludek




Tested chipsets:

ftdi_sio [TTL], Bus 004 Device 003: ID 0403:6001 Future Technology Devices International, Ltd FT232 Serial (UART) IC
pl2303 [TTL], Bus 001 Device 005: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port / Mobile Action MA-8910P
ch341-uart [RS232], Bus 001 Device 006: ID 1a86:7523 QinHeng Electronics CH340 serial converter



Tested chipset|platform|OS|kernel:

ftdi_sio|Raspberry Pi 4 Model B Rev 1.4|Oracle Linux Server 8.5|kernel-5.16.0-rc5
* errors only in s->u direction, often corrupted without load

ftdi_sio|Raspberry Pi 4 Model B Rev 1.4|Oracle Linux Server 8.5|kernel-uek-5.15-2148.0.1.el8uek
* errors only in s->u direction

ftdi_sio|BananaPi-M64|openSUSE Tumbleweed 20210829|5.13.12-2-default
ftdi_sio|BananaPi-M64|openSUSE Tumbleweed 20211202|5.15.5-1-default
* errors only in s->u direction, often corrupted without load

ftdi_sio|Raspberry Pi 4 Model B Rev 1.4|Raspbian GNU/Linux 10 (buster)|5.10.63-v7l+
* errors only in s->u direction

ftdi_sio|Raspberry Pi 4 Model B Rev 1.4|Ubuntu 21.10|5.13.0-1011-raspi
* errors only in s->u direction

ftdi_sio|Raspberry Pi 4 Model B Rev 1.4|openSUSE Tumbleweed 20211202|5.15.5-1-default
* errors only in s->u direction

pl2303|Raspberry Pi 4 Model B Rev 1.4|Oracle Linux Server 8.5|kernel-uek-5.4.17-2136.300.7.el8uek
pl2303|Raspberry Pi 4 Model B Rev 1.4|Oracle Linux Server 8.5|kernel-uek-5.15-2148.0.1.el8uek
* errors only in s->u direction

pl2303|Raspberry Pi 4 Model B Rev 1.4|openSUSE Tumbleweed 20211202|5.15.5-1-default
* errors only in s->u direction, often corrupted without load

pl2303|Raspberry Pi 4 Model B Rev 1.4|Ubuntu 21.10|5.13.0-1011-raspi
* errors only in s->u direction, for miniUART & socat errors seems to be really rare under load

pl2303|Raspberry Pi 4 Model B Rev 1.4|Raspbian GNU/Linux 10 (buster)|5.10.63-v7l+
* errors only in s->u direction

ch341-uart|x86_64|Ubuntu 18.04.5 LTS|4.15.0-154-generic
* I was able only once to run this setup, kernel seemed to be resistant under load. Chipset is unreliable.


Attachment: usb_uart.sh
Description: application/shellscript


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux