From: One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>
To: Peter Hurley <peter@hurleysoftware.com>
Cc: Pavel Roskin <proski@gnu.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jslaby@suse.cz>,
linux-kernel@vger.kernel.org
Subject: Re: serial8250: bogus low_latency destabilizes kernel, need sanity check
Date: Mon, 3 Feb 2014 11:10:40 +0000 [thread overview]
Message-ID: <20140203111040.4cafe560@alan.etchedpixels.co.uk> (raw)
In-Reply-To: <52ED0E0F.5050300@hurleysoftware.com>
On Sat, 01 Feb 2014 10:09:03 -0500
Peter Hurley <peter@hurleysoftware.com> wrote:
> On 01/14/2014 11:24 AM, Pavel Roskin wrote:
> > Hi Alan,
> >
> > Quoting One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>:
> >
> >>> Maybe we should unset the low_latency flag as soon as DMA fails? There
> >>> are two flags, one is state->uart_port->flags and the other is
> >>> port->low_latency. I guess we need to unset both.
> >>
> >> Well low latency and DMA are pretty much exclusive in the real world so
> >> probably DMA ports shouldn't allow low_latency to be set at all in DMA
> >> mode.
> >
> > That's a useful insight. I assumed exactly the opposite.
>
> The meaning of low_latency has migrated since 2.6.28
Not really. The meaning of low latency was always "get the turn around
time for command/response protocols down as low as possible". DMA driven
serial usually reports a transfer completion on a watermark or a timeout,
so tends to work very badly within the Linux definition of 'low latency'
for tty.
What it does has certainly changed but thats implementation detail.
> Perhaps we should unconditionally unset low_latency (or remove it entirely).
> Real low latency can be addressed by using the -RT kernel.
Just saying "use -RT" would be a regression and actually hurt quite a few
annoying "simple protocol" using tools for all sorts of control systems.
We are talking about milliseconds not microseconds here.
The expected behaviour in low_latency is probably best described as
data arrives
processed
wakeup
and to avoid the case of
data arrives
queued for back end
[up to 10mS delay, but typically 1-2mS]
processed
wakeup
which multipled over a 50,000 S record download is a lot of time
Everything else is not user visible so can be changed freely to get that
assumption to work (including ending up not needing it in the first
place).
Getting tty to the point everything but N_TTY canonical mode is a fast
path would probably eliminate the need nicely - I don't know of any use
cases that expect ICANON, ECHO or I*/O* processing for low latency.
next prev parent reply other threads:[~2014-02-03 11:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-14 0:35 Pavel Roskin
2014-01-14 12:08 ` One Thousand Gnomes
2014-01-14 16:24 ` Pavel Roskin
2014-02-01 15:09 ` Peter Hurley
2014-02-03 11:10 ` One Thousand Gnomes [this message]
2014-02-04 12:42 ` Peter Hurley
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=20140203111040.4cafe560@alan.etchedpixels.co.uk \
--to=gnomes@lxorguk.ukuu.org.uk \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=peter@hurleysoftware.com \
--cc=proski@gnu.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
all inboxes | Powered by JetHome®