public inbox for linux-rt-users@vger.kernel.org
 help / color / mirror / Atom feed
From: "Ahmed S. Darwish" <a.darwish@linutronix.de>
To: Matthias Klein <matthias.klein@optimeas.de>
Cc: "linux-rt-users@vger.kernel.org" <linux-rt-users@vger.kernel.org>
Subject: Re: Working sample 5.10 kernel configuration for an IMX6 board?
Date: Fri, 9 Jul 2021 12:18:59 +0200	[thread overview]
Message-ID: <YOgikyyE7WhOP799@lx-t490> (raw)
In-Reply-To: <AM0PR10MB31078807FE14B686B727CA2A99199@AM0PR10MB3107.EURPRD10.PROD.OUTLOOK.COM>

On Thu, Jul 08, 2021 at 03:46:14PM +0000, Matthias Klein wrote:
>
> The configuration is attached.
>

I've quickly inspected the .config file resulting from the defconfig
above.  You should disable the enabled symbols below:

  - CONFIG_PROVE_LOCKING
  - CONFIG_DEBUG_ALIGN_RODATA
  - CONFIG_DEBUG_FS_ALLOW_ALL
  - CONFIG_DEBUG_MISC
  - CONFIG_DEBUG_PREEMPT
  - CONFIG_DEBUG_RT_MUTEXES
  - CONFIG_DEBUG_SPINLOCK
  - CONFIG_DEBUG_MUTEXES
  - CONFIG_DEBUG_WW_MUTEX_SLOWPATH
  - CONFIG_DEBUG_RWSEMS
  - CONFIG_DEBUG_LOCK_ALLOC
  - CONFIG_DEBUG_USER
  - CONFIG_NO_HZ_COMMON
  - CONFIG_NO_HZ_IDLE
  - CONFIG_NO_HZ

You also have a lot of CPU frequency governors enabled. Disable all of
them except the performance governor and make sure that
CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y.

The above, especially disabling CONFIG_PROVE_LOCKING and
CONFIG_DEBUG_PREEMPT, should really fix your problem.

If you still have issues, play around with disabling CONFIG_CPU_IDLE and
its governors. Note though that CPU manufacturers sometimes advise
against doing this.

If the latency is still higher than desired, see if CONFIG_DRM and high
GPU workloads negatively affects it . On some architectures, latency can
increase by 100 microseconds or more due to sharing of the Last Level
Cache and memory bandwidth between the GPU and the CPU.

After all of this, if latency is still higher than the 100->150
microseconds range, it's possible that the custom code you've added is
doing shady stuff; e.g., manually disabling interrupts or preemption.

If it aint so, and the latency is still higher than the expected range
(even with a pure RT release), then you'll need to manually trace the
kernel and catch the offending call chain.

Good luck,

--
Ahmed S. Darwish
Linutronix GmbH

  reply	other threads:[~2021-07-09 10:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-08  7:43 Working sample 5.10 kernel configuration for an IMX6 board? Matthias Klein
2021-07-08 15:21 ` Ahmed S. Darwish
2021-07-08 15:25 ` Ahmed S. Darwish
2021-07-08 15:46   ` AW: " Matthias Klein
2021-07-09 10:18     ` Ahmed S. Darwish [this message]
2021-07-12 14:34       ` Matthias Klein
2021-07-13  5:41         ` Ahmed S. Darwish

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=YOgikyyE7WhOP799@lx-t490 \
    --to=a.darwish@linutronix.de \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=matthias.klein@optimeas.de \
    /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