RE: [suse-programming-e] serial port overrun
I have this classic but very annoying problem with the UART since upgrading from 9.0 to 9.3: It seems that the kernel has become unable to service IRQs from the UART fast enough.
This results in buffer overflows: During a bulk dump (256kBytes) from serial device to disk, the UART (16550A) will overflows typically 2 or 3 times, even though computer seems idle.
The setup is arcom gx1, National Semi Geode 300MHz, 40 GB, 128 MB. The box is used to talk to an acquisition instrument through RS232 at 115200 bauds, with hardware flow control turned on.
Neither the BIOS, the HDD or the C code for talking to the UART have changed during the transition from 9.0 to 9.3 so I am pretty convinced this could be a kernel config problem.
Are there any kernel config parameters that could help servicing the UART more efficiently? I know this is a bit off-topic but any suggestions are welcome.
Is the C-code you're talking about a user program that opens the /dev/ttySx port and loops on select() read() or do you have your own driver? What does dmesg say?
The c code is a simple user program with canonical reads in a for loop. Looking at console tty10 during an upload from device to computer, you get ttyS0: 1 input overrun(s) ttyS0: 2 input overrun(s) ttyS0: 1 input overrun(s) In average, you get 3~4 overruns per upload, but it can drop to 1 or 0. ------------------------------------------------------------------- This e-mail and any attachments may contain confidential and/or privileged material; it is for the intended addressee(s) only. If you are not a named addressee, you must not use, retain or disclose such information. NPL Management Ltd cannot guarantee that the e-mail or any attachments are free from viruses. NPL Management Ltd. Registered in England and Wales. No: 2937881 Registered Office: Serco House, 16 Bartley Wood Business Park, Hook, Hampshire, United Kingdom RG27 9UY -------------------------------------------------------------------
On Friday 02 September 2005 6:23 am, Francois Maletras wrote:
The c code is a simple user program with canonical reads in a for loop. Looking at console tty10 during an upload from device to computer, you get ttyS0: 1 input overrun(s) ttyS0: 2 input overrun(s) ttyS0: 1 input overrun(s)
In average, you get 3~4 overruns per upload, but it can drop to 1 or 0. One of the things you really need to do is to get a serial port analyzer. I have not used one in years, but the ones we used were breakout boxes. Not only do these have the capability to change pins, bit they also have leds. You really want to see if the hardware flow control is actually working or not. I have not done any serial port programming in a number of years, but you can really pull your hair out trying to debug this stuff. -- Jerry Feldman <gaf@blu.org> Boston Linux and Unix user group http://www.blu.org PGP key id:C5061EA9 PGP Key fingerprint:053C 73EC 3AC1 5C44 3E14 9245 FB00 3ED5 C506 1EA9
participants (2)
-
Francois Maletras
-
Jerry Feldman