From: lsorense@csclub.uwaterloo.ca (Lennart Sorensen)
To: Paul Fulghum <paulkf@microgate.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Strange problem with tty layer
Date: Fri, 26 Jan 2007 09:20:41 -0500 [thread overview]
Message-ID: <20070126142041.GD7584@csclub.uwaterloo.ca> (raw)
In-Reply-To: <20070125151639.GH7582@csclub.uwaterloo.ca>
On Thu, Jan 25, 2007 at 10:16:39AM -0500, Lennart Sorensen wrote:
> I am now trying this, which so far seem to help (I had a printk in there
> earlier and managed to trigger that).
>
> --- ori/drivers/char/tty_io.c 2007-01-24 18:02:48.000000000 -0500
> +++ new/drivers/char/tty_io.c 2007-01-25 09:50:02.000000000 -0500
> @@ -2774,6 +2778,14 @@
> spin_lock_irqsave(&tty->buf.lock, flags);
> while((tbuf = tty->buf.head) != NULL) {
> while ((count = tbuf->commit - tbuf->read) != 0) {
> + if (!tty->receive_room) {
> + schedule_delayed_work(&tty->buf.work, 1);
> + spin_unlock_irqrestore(&tty->buf.lock, flags);
> + goto out;
> + }
> + if (count > tty->receive_room) {
> + count = tty->receive_room;
> + }
> char_buf = tbuf->char_buf_ptr + tbuf->read;
> flag_buf = tbuf->flag_buf_ptr + tbuf->read;
> tbuf->read += count;
>
> This appeared to be (essentially) the key change in 2.6.18 related to
> the check of tty->receive_room.
>
> I will now run a bunch more tests to see if it manages to keep it from
> having any more character losses.
>
> Thank you for the suggestion of where to look.
Well it turns out that didn't help. Neither does 2.6.18 (that one was
the easiest newer one to try). It does seem as if the error rate is
lower with 2.6.18 than with 2.6.16, so perhaps there was more than one
place that could cause losses in the tty buffering. I had only 2
failures in 15 hours with 2.6.18, rather than a whole lot of failures
with 2.6.16. I guess I will have to try 2.6.19 or even something newer.
--
Len Sorensen
next prev parent reply other threads:[~2007-01-26 14:20 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-24 20:40 Lennart Sorensen
2007-01-24 21:20 ` Paul Fulghum
2007-01-24 21:48 ` Lennart Sorensen
2007-01-25 15:16 ` Lennart Sorensen
2007-01-26 14:20 ` Lennart Sorensen [this message]
2007-01-26 14:51 ` Paul Fulghum
2007-01-26 14:56 ` Lennart Sorensen
2007-01-26 15:06 ` Paul Fulghum
2007-01-26 16:08 ` Lennart Sorensen
2007-01-29 19:27 ` Lennart Sorensen
2007-02-17 16:09 ` Lennart Sorensen
2007-01-24 21:19 Kilau, Scott
2007-01-24 21:34 ` Lennart Sorensen
2007-01-25 14:31 ` Russell King
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=20070126142041.GD7584@csclub.uwaterloo.ca \
--to=lsorense@csclub.uwaterloo.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=paulkf@microgate.com \
/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
Powered by JetHome