From: Steven Rostedt <rostedt@goodmis.org>
To: Daniel Bristot de Oliveira <bristot@kernel.org>
Cc: Prasad Pandit <ppandit@redhat.com>, linux-trace-users@vger.kernel.org
Subject: Re: About rtla osnoise and timerlat usage
Date: Thu, 23 Feb 2023 09:39:00 -0500 [thread overview]
Message-ID: <20230223093900.6a89b7a5@gandalf.local.home> (raw)
In-Reply-To: <0d75a9a8-ba31-c2d2-e317-0a28d01cd36b@kernel.org>
On Thu, 23 Feb 2023 11:17:03 -0300
Daniel Bristot de Oliveira <bristot@kernel.org> wrote:
> I am not sure if I understood what you mean but...
>
> kworker/[120] <--- this 120 is likely not the same as
> ktimer/[97] <---- this 97
>
> The kworker is likely a SCHED_OTHER 0 nice, and ktimer a FIFO:97.
>
> You are placing your load in between them.
>
> That would not be bad if we ran a traditional periodic/sporadic real-time
> workload. That is, task that waits for an event, wakes up, runs, and goes
> to sleep waiting for the next event.
>
> The problem is that oslat/osnoise run non-stop.
>
> Then a kworker awakened on the CPU will... starve. You will not see it
> causing a sched_switch, but if the kworker is pinned to that CPU, it wil
> not make progress.
Note, the kworker and other kernel threads that are pinned to a CPU are
ones that service requests that were triggered on that CPU. It is possible
to run a task at FIFO 99 on an isolated CPU non stop without causing any
issue (you may also need to enable NO_HZ_FULL and make sure RCU has
no-callbacks enabled where the RCU for that isolated CPU gets its work done
on other CPUs).
If your FIFO task calls into the kernel and does something that triggers a
worker, then you may then have an issue. You will need to make sure that
worker gets time to run.
The point I'm making is that it is possible to get something working where
you have a FIFO task running 100%, but you need to set up the system where
it will not cause issues. That requires knowing what system calls that are
done on that CPU that may require workers.
Oh, and there's another issue that can cause problems. Even if you figured
out everything your task does, and make sure that it doesn't trigger any
pinned kworkers, and you are using NO_CB_RCU and NO_HZ_FULL, there's still
an issue that needs to be taken care of. That is, if there was some task
running on that CPU just before your FIFO task runs, it could have
triggered a kworker. And even though it may be done, or even migrated to
another CPU, that kworker will still need to execute. I've seen this cause
days of debugging to why the system crashed.
-- Steve
next prev parent reply other threads:[~2023-02-23 14:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAE8KmOxedTiM8GJVp+-HuBW=jkuE=aSKFYrmaj8zHLmQP-1RCg@mail.gmail.com>
2023-02-22 11:59 ` About rtla osnoise and timerlat usage Daniel Bristot de Oliveira
[not found] ` <CAE8KmOzuCqp5w4FBVd6GjPg_znQhumcsA=PKozZbQWxXPdZYXg@mail.gmail.com>
2023-02-22 13:15 ` Daniel Bristot de Oliveira
[not found] ` <CAE8KmOxV8u3v4ALVvqOUO+zvnd99d6iSXw0RiSLondvdX_JJSA@mail.gmail.com>
2023-02-23 12:12 ` Prasad Pandit
2023-02-23 14:38 ` Daniel Bristot de Oliveira
2023-02-23 14:17 ` Daniel Bristot de Oliveira
2023-02-23 14:39 ` Steven Rostedt [this message]
2023-02-23 14:54 ` Daniel Bristot de Oliveira
2023-02-27 7:10 ` Prasad Pandit
2023-02-22 18:06 ` Daniel Bristot de Oliveira
2023-02-22 19:13 ` Prasad Pandit
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=20230223093900.6a89b7a5@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=bristot@kernel.org \
--cc=linux-trace-users@vger.kernel.org \
--cc=ppandit@redhat.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