From: Peter Hurley <peter@hurleysoftware.com>
To: Pavel Roskin <proski@gnu.org>,
One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>
Cc: 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: Sat, 01 Feb 2014 10:09:03 -0500 [thread overview]
Message-ID: <52ED0E0F.5050300@hurleysoftware.com> (raw)
In-Reply-To: <20140114112457.q54ujbz9c444s040-cebfxv@webmail.spamcop.net>
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
Although it used to mean 'process the input immediately even in
interrupt context', it has become 'the device doesn't receive data
in interrupt context so process the data now'.
> But how should a real low_latency device work?
A low_latency device does not receive data in interrupt context;
ie., tty_flip_buffers() cannot be called from an irq handler
or with interrupts disabled.
> Are they supported by 8250_core?
yes
> Do they have hard IRQs?
possibly but not for rx
> Are those IRQs handled by serial8250_handle_irq()?
possibly, but again not for rx
> If DMA is not used, then serial8250_rx_chars() is the only way to receive data.
> But serial8250_rx_chars() calls tty_flip_buffer_push() unconditionally,
> and the later should not be called from the IRQ context for low_latency devices,
> if the comment about it is to be trusted.
Exactly.
Perhaps we should unconditionally unset low_latency (or remove it entirely).
Real low latency can be addressed by using the -RT kernel.
Regards,
Peter Hurley
next prev parent reply other threads:[~2014-02-01 15:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-14 0:35 serial8250: bogus low_latency destabilizes kernel, need sanity check Pavel Roskin
2014-01-14 12:08 ` One Thousand Gnomes
2014-01-14 16:24 ` Pavel Roskin
2014-02-01 15:09 ` Peter Hurley [this message]
2014-02-03 11:10 ` One Thousand Gnomes
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=52ED0E0F.5050300@hurleysoftware.com \
--to=peter@hurleysoftware.com \
--cc=gnomes@lxorguk.ukuu.org.uk \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--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