From: Matthieu CASTET <matthieu.castet@parrot.com>
To: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
linux-serial@vger.kernel.org, Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: uart : lost characters when system is busy
Date: Fri, 10 Jun 2011 10:58:17 +0200 [thread overview]
Message-ID: <4DF1DCA9.9060604@parrot.com> (raw)
Hi,
the linux uart layer can loose some characters if the system is busy.
uart_throttle/uart_unthrottle is called from a workqueue.
If the system is busy, and the uart receive lot's of data, we fill the tty
buffer, but the workqueue doesn't run and we never have a chance to call
uart_throttle. So the uart is never slow down.
And because most uart driver call uart_insert_char (that doesn't return if
tty_insert_flip_char manage to push the character), we never detect that there
are some lost characters.
A workaround could be to check the buffer threshold in tty_flip_buffer_push and
call throttle callback if needed.
Matthieu
WARNING: multiple messages have this Message-ID (diff)
From: Matthieu CASTET <matthieu.castet@parrot.com>
To: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
<linux-serial@vger.kernel.org>,
Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: uart : lost characters when system is busy
Date: Fri, 10 Jun 2011 10:58:17 +0200 [thread overview]
Message-ID: <4DF1DCA9.9060604@parrot.com> (raw)
Hi,
the linux uart layer can loose some characters if the system is busy.
uart_throttle/uart_unthrottle is called from a workqueue.
If the system is busy, and the uart receive lot's of data, we fill the tty
buffer, but the workqueue doesn't run and we never have a chance to call
uart_throttle. So the uart is never slow down.
And because most uart driver call uart_insert_char (that doesn't return if
tty_insert_flip_char manage to push the character), we never detect that there
are some lost characters.
A workaround could be to check the buffer threshold in tty_flip_buffer_push and
call throttle callback if needed.
Matthieu
next reply other threads:[~2011-06-10 8:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-10 8:58 Matthieu CASTET [this message]
2011-06-10 8:58 ` uart : lost characters when system is busy Matthieu CASTET
2011-06-10 9:20 ` Alan Cox
2011-06-10 9:20 ` Alan Cox
2011-06-10 10:05 ` Matthieu CASTET
2011-06-10 10:05 ` Matthieu CASTET
2011-06-10 11:35 ` Alan Cox
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=4DF1DCA9.9060604@parrot.com \
--to=matthieu.castet@parrot.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.