All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Ogness <john.ogness@linutronix.de>
To: "André Pribil" <a.pribil@beck-ipc.com>
Cc: "linux-rt-users@vger.kernel.org" <linux-rt-users@vger.kernel.org>
Subject: Re: tty latency and RT
Date: Fri, 06 Jul 2018 11:16:31 +0200	[thread overview]
Message-ID: <87muv4zpu8.fsf@linutronix.de> (raw)
In-Reply-To: <681500CE65202E47A192754B01DAB4673BE3D87A37@SDE12.beckipc.net> ("André Pribil"'s message of "Fri, 6 Jul 2018 10:51:08 +0200")

Hi,

On 2018-07-06, André Pribil <a.pribil@beck-ipc.com> wrote:
> are there any plans to improve the latency with serial ttys and RT?
>
> I'm seeing very high latencies (up to 100 ms) when a high priority 
> RT thread accesses a serial tty port. I'm working with 4.14.52-rt34 
> on a ARM system.

As you later point out, this is a problem with the tty subsystem
(kworker) and is not RT-specific. This problem needs to be fixed in
mainline.

> The reason for this issue seems to be that a kworker thread with a 
> normal priority is involved here. When the high priority RT 
> thread needs to wait for this kworker thread, it can easily be blocked 
> by other lower priority RT threads running in the system.
>
> I have seen that Steven Walter proposed some change in 2015, where
> this kworker thread in replaced by a kthread with a RT priority if
> the low_latency mode is selected.
> See: https://www.spinics.net/lists/linux-serial/msg17782.html
>
> The follow-up discussion in this thread also proposes a solution that
> allows low_latency ports to directly execute the worker.
> As interrupts are already threaded in PREEMPT_RT, wouldn't that be a 
> solution?

The patches and discussions in that thread provide some good ground work
for a real solution. Someone needs to take more time to work with the
maintainers to get it mainline.

John Ogness

  reply	other threads:[~2018-07-06  9:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-06  8:51 tty latency and RT André Pribil
2018-07-06  9:16 ` John Ogness [this message]
2018-07-09  9:55   ` Esben Haabendal
2018-07-09 11:37     ` André Pribil
2018-07-11  8:09     ` Sebastian Andrzej Siewior
2018-07-13  8:33       ` Esben Haabendal
2018-07-18 16:49         ` Sebastian Andrzej Siewior

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=87muv4zpu8.fsf@linutronix.de \
    --to=john.ogness@linutronix.de \
    --cc=a.pribil@beck-ipc.com \
    --cc=linux-rt-users@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.