Losing serial characters may not be an SMP problem. The current serial
driver ungracefully drops characters on the floor once its buffer fills
up:
do {
ch = serial_inp(info, UART_RX);
if (tty->flip.count >= TTY_FLIPBUF_SIZE)
break;
*tty->flip.char_buf_ptr = ch;
icount->rx++;
So if it's not an interrupt latency problem, the characters may be
getting read from the port but then discarded. Perhaps it would be
useful to put a printk() message for the first time a character is
discarded this way.
The flip buffer is flipped every clock tick, and unless you're running
at 960800 baud or higher (and there are a few mad fools that are trying
this --- Hi Alan! :-), the flip buffer is sized to guarantee that it
won't overflow, even if you miss a clock tick.
There are known interrupt latency problems that cause characters to be
dropped by the UART, before the serial driver has a chance to get the
characters. This was intential due to some broken IDE controllers that
could cause MASSIVE FILESYSTEM DAMAGE if the problem was not worked
around. It was considered better to occasionally have dropped serial
characters during heaving disk IO than to risk user's data. If you
don't have the bad controller hardware, though, it's safe to turn off
the workaround, and that will likely solve the problem with serial
characters being dropped. Read the hdparm man page very carefully,
especially the part about MASSIVE FILESYSTEM DAMAGE, and then decide if
you want to back up your data before trying to use the -u option.
(Hint: the answer is you want to bank up your data. I will not be held
responsible if you suffur MASSIVE FILESYSTEM DAMAGE.)
- Ted