public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Alan Curry" <pacman-kernel@manson.clss.net>
To: torvalds@osdl.org (Linus Torvalds)
Cc: schwab@suse.de (Andreas Schwab), linux-kernel@vger.kernel.org
Subject: Re: Pty is losing bytes
Date: Tue, 15 Feb 2005 15:06:33 -0500 (EST)	[thread overview]
Message-ID: <20050215200633.10668.qmail@manson.clss.net> (raw)
In-Reply-To: <Pine.LNX.4.58.0502151053060.5570@ppc970.osdl.org> from "Linus Torvalds" at Feb 15, 2005 11:08:07 AM

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)


  parent reply	other threads:[~2005-02-15 20:11 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-15  0:54 Pty is losing bytes Andreas Schwab
2005-02-15 19:08 ` Linus Torvalds
2005-02-15 19:44   ` Linus Torvalds
2005-02-15 22:13     ` Alan Cox
2005-02-15 19:58   ` Sergey Vlasov
2005-02-15 20:13     ` Sergey Vlasov
2005-02-15 20:06   ` Alan Curry [this message]
2005-02-15 20:30   ` Andreas Schwab
2005-02-15 20:56     ` Linus Torvalds
2005-02-15 21:54       ` Andreas Schwab
2005-02-16  3:12       ` Roman Zippel
2005-02-16  4:05         ` Linus Torvalds
2005-02-16 14:42           ` Theodore Ts'o
2005-02-16 16:06             ` Linus Torvalds
2005-02-17  4:44               ` Theodore Ts'o
2005-02-17 15:45                 ` Linus Torvalds
2005-02-18 16:32                   ` Theodore Ts'o
2005-02-16 19:49           ` Roman Zippel
2005-02-16 19:58             ` Linus Torvalds
2005-02-16 22:46               ` Andrew Morton
  -- strict thread matches above, loose matches on Subject: below --
2005-02-15  2:00 Alex Davis
2005-02-15 10:48 ` Andreas Schwab
2005-02-15 11:01   ` Jan De Luyck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050215200633.10668.qmail@manson.clss.net \
    --to=pacman-kernel@manson.clss.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=schwab@suse.de \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox