Re: Strange problem with tty layer

From: Lennart Sorensen
Date: Wed Jan 24 2007 - 16:49:00 EST


On Wed, Jan 24, 2007 at 03:20:53PM -0600, Paul Fulghum wrote:
> In 2.6.16 the tty buffering pushes data to the line
> discipline without regard to tty->receive_room.
> If the line discipline can't keep up, the data gets dropped.
> I observed this data loss at higher speeds when
> placing the system under heavy load.
>
> 2.6.18 added code to respect tty->receive_room.
>
> This may or may not be your problem, but you should
> be able to check by adding a conditional printk
> to drivers/char/tty_io.c:flush_to_ldisc()
>
> If tty->receive_room is less than the size of the buffer
> passed to disc->receive_buf() then you are losing data.

Sounds plausible. Certainly higher cpu load makes the problem occour
more often, and making the system slower made it worse too. I will take
a look at the tty_io.c in 2.6.18 and compare it against 2.6.16.

--
Len Sorensen
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/