linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Austin Schuh <austin.linux@gmail.com>
To: Michel Macena Oliveira <michel@austral-dynamics.com>
Cc: Itai Handler <itai.handler@gmail.com>, linux-rt-users@vger.kernel.org
Subject: Re: Serial port driver usage and status
Date: Tue, 11 Aug 2020 12:07:01 -0700	[thread overview]
Message-ID: <CABsbf=Gy+riw2EBuD=6xL1VGJ8WTuFwt4-2kj8T1TFeBH++VwA@mail.gmail.com> (raw)
In-Reply-To: <CAKkbJ-xyCH_RkOaihdN01sFRSznbX-Br7MrG9x0SRwDR6KAmYQ@mail.gmail.com>

On Tue, Aug 11, 2020 at 7:43 AM Michel Macena Oliveira
<michel@austral-dynamics.com> wrote:
>
> Austin thanks for the Idea, those tests will give more reliable results.
> Itai thanks for the idea, I will search more about ftrace.
>
> Another newbie question, when I put a read or write call inside a
> thread with real time priority, I can say that the call is real time
> scheduled or should I code in a different way
> to "make it" real time?  I mean, if just the fact that a function is
> inside the RT thread with high priority  is enough to say it is real
> time. I am asking this because I'm
> still learning how the real time context fits into the Preempt RT
> kernel concept.

In principle, there's nothing special you need to do from the user space side.

In practice, every driver is special in it's own way.  There are
threaded IRQs associated with the critical path from IO to you that
you may want to re-prioritize.  You'll find bugs in other drivers
where there are work-queues in the middle.  The list goes on.

I've found that the best thing to do is exactly what you are doing,
setup a benchmark which actually lets you measure the latency and
jitter, see how well it is performing, and start tracing to figure out
if something is going wrong in the critical path.  I've found tracing
the scheduler, irq, and workqueue events to be quite effective at
figuring what is going on.

Austin

      reply	other threads:[~2020-08-11 19:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-16 17:29 Serial port driver usage and status Michel Macena Oliveira
2020-07-16 19:26 ` Itai Handler
2020-07-16 20:20   ` Michel Macena Oliveira
2020-07-16 20:40     ` Itai Handler
2020-07-16 20:40     ` Austin Schuh
2020-08-05 18:29       ` Michel Macena Oliveira
2020-08-05 19:21         ` Itai Handler
2020-08-05 19:52           ` Michel Macena Oliveira
2020-08-06 19:56             ` Itai Handler
2020-08-11 14:43               ` Michel Macena Oliveira
2020-08-11 19:07                 ` Austin Schuh [this message]

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='CABsbf=Gy+riw2EBuD=6xL1VGJ8WTuFwt4-2kj8T1TFeBH++VwA@mail.gmail.com' \
    --to=austin.linux@gmail.com \
    --cc=itai.handler@gmail.com \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=michel@austral-dynamics.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;
as well as URLs for NNTP newsgroup(s).