public inbox for linux-rt-users@vger.kernel.org
 help / color / mirror / Atom feed
From: Punit Agrawal <punitagrawal@gmail.com>
To: John Kacur <jkacur@redhat.com>
Cc: John Ogness <john.ogness@linutronix.de>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	Clark Williams <williams@redhat.com>,
	Pierre FICHEUX <pierre.ficheux@smile.fr>,
	linux-rt-users@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: Strange problem with PREEMPT_RT
Date: Fri, 01 Oct 2021 08:22:29 +0900	[thread overview]
Message-ID: <877dex4pje.fsf@stealth> (raw)
In-Reply-To: <49773379-4c5b-b6be-5125-9884e2b364aa@redhat.com> (John Kacur's message of "Thu, 30 Sep 2021 12:16:23 -0400 (EDT)")

John Kacur <jkacur@redhat.com> writes:

> On Thu, 30 Sep 2021, John Ogness wrote:
>
>> On 2021-09-30, John Kacur <jkacur@redhat.com> wrote:
>> >>>> With hackbench, the system is sufficiently busy to avoid the going
>> >>>> into idle.
>> >>>
>> >>> Not just that. cyclictest's usage of /dev/cpu_dma_latency has the side
>> >>> effect that it may disable some of the PM stuff in the system.
>> >>> So your system appears good but then when cyclictest is gone, the
>> >>> numbers go up.
>> >>>
>> >>> Maybe we should drop that so we observe a system without altering its
>> >>> behaviour?
>> >> 
>> >> +1
>> >> 
>> >> Developers wanting to explicitly cause this behavior can use --latency=
>> >> to enable it. Having it on as a default is misleading.
>> >
>> > Where does this "--latency=" option apply to?
>
> I see this option was dropped from the help, will add it back.
>
>> 
>> It is the value written to /dev/cpu_dma_latency, which AFAIK writes the
>> maximum acceptable latency (in microseconds). This translates to the
>> allowed C states. cyclictest currently writes 0, which should keep the
>> processor in C0. For example, setting it to 1-5, should allow C0 and C1.
>> 
>> Using --laptop will cause cyclictest to avoid touching
>> /dev/cpu_dma_latency. But nobody would know that unless they looked at
>> the code.
>> 
>> IMHO, systems should be configured for production use and cyclictest
>> should just _measure_ latencies at a specified priority level. But by
>> default cyclictest is adjusting global system behavior during
>> measurements, thus providing results that the system (as it is actually
>> configured) would not be able to provide.
>
> The thing is, we are not just trying to measure an environment, we are 
> also simulating a realtime application. If your realtime environment 
> doesn't disable c-states, then your realtime application probably
> should.

I agree something (firmware, OS, application) should disable c-states -
cyclictest doing it during measurements hides the fact that the system
isn't configured correctly for applications requiring low latencies.

I do too lean towards "altering system behaviour is better left outside
the application" as different system have different knobs and need
different tweaking to achieve low latency.

> It's always a question of are we trying to measure a worse case scenario 
> or a best case scenario.
>
> If I remove this default we're going to get a slew of reports from people 
> using cyclictest wondering why they aren't getting good realtime 
> performance.

Perhaps, this is a change best done with a major version bump. Not that
it'll stop users queries completely but hopefully more people will pay
attention to the changelog.

[...]

  reply	other threads:[~2021-09-30 23:22 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-29 16:40 Strange problem with PREEMPT_RT Pierre FICHEUX
2021-09-30  0:13 ` Punit Agrawal
2021-09-30  8:21   ` Pierre FICHEUX
2021-09-30 13:17     ` Luis Goncalves
2021-09-30 13:18     ` Sebastian Andrzej Siewior
2021-09-30 13:23   ` Sebastian Andrzej Siewior
2021-09-30 13:26     ` Pierre FICHEUX
2021-09-30 13:51       ` Sebastian Andrzej Siewior
2021-09-30 14:31         ` Pierre FICHEUX
2021-09-30 23:40           ` Punit Agrawal
2021-10-03 11:11             ` Jack Winch
2021-10-04 12:54               ` John Kacur
2021-10-18  9:12           ` Sebastian Andrzej Siewior
2021-09-30 13:41     ` John Ogness
2021-09-30 14:25       ` John Kacur
2021-09-30 15:02         ` John Ogness
2021-09-30 15:49           ` Sebastian Andrzej Siewior
2021-09-30 16:16           ` John Kacur
2021-09-30 23:22             ` Punit Agrawal [this message]
2021-09-30 14:59       ` John Kacur
2021-09-30 23:01     ` Punit Agrawal

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=877dex4pje.fsf@stealth \
    --to=punitagrawal@gmail.com \
    --cc=bigeasy@linutronix.de \
    --cc=jkacur@redhat.com \
    --cc=john.ogness@linutronix.de \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=pierre.ficheux@smile.fr \
    --cc=tglx@linutronix.de \
    --cc=williams@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