lkml.org 
[lkml]   [2005]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Pty is losing bytes
Date
Linus Torvalds writes the following:
>
>Does the problem go away if you change the default value of "chunk" (in
>drivers/char/tty_io.c:do_tty_write) from 4096 to 2048? If so, that means
>that the pty code has _claimed_ to have written 4kB, and only ever wrote
>4kB-1 bytes. That in turn implies that "ldisc.receive_room()" disagrees
>with "ldisc.receive_buf()".
>

That does fix it for me, in 2.6.10-as3 (the -as3 patch doesn't touch anything
near the pty code, so it should be good for vanilla 2.6.10 too).

I noticed while testing that the "lost byte" is occasionally more than one
byte. It's always one byte at the 4k mark, but sometimes a larger group of
bytes is lost around the 8k mark, and (more rarely) an even larger group of
bytes is lost at the 12k mark.

$ ls -l /etc/mime.types
-rw-r--r-- 1 root root 15723 Apr 9 2002 /etc/mime.types
$ while :; do ./ptytest < /etc/mime.types | wc -c ; sleep 1 ; done
15722
15710
15722
15710
15722
15710
15722
15722
15682
(and so on)

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

\
 
 \ /
  Last update: 2005-03-22 14:10    [W:1.488 / U:0.648 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site