From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Florian Paul Schmidt <mista.tapas@gmx.net>
Cc: linux-rt-users@vger.kernel.org
Subject: Re: Raspberry Pi 5 and PREEMPT_RT (6.13.0-rc3)
Date: Tue, 7 Jan 2025 15:39:37 +0100 [thread overview]
Message-ID: <20250107143937.d_ho7CXb@linutronix.de> (raw)
In-Reply-To: <d445e582-4e49-4135-9d94-f52d72ec5df6@gmx.net>
On 2024-12-20 14:18:43 [+0100], Florian Paul Schmidt wrote:
> Hi!
Hi,
> I'm playing around with a Raspberry Pi 5 and a PREEMPT_RT kernel (raspberry
> pi 6.13.y branch) and wonder about the latencies I see. First I tried
> cyclictest and saw latencies in the upper 50s up to 80s or so under a
> kernel compile load.
>
> So I compiled the kernel with timerlat and osnoise tracers and ran a bit of
>
> rtla timerlat top -a 60 --dma-latency 0
>
> and I get traces like the following:
…
> ## CPU 3 hit stop tracing, analyzing it ##
> IRQ handler delay: 0.00 us (0.00 %)
> IRQ latency: 5.16 us
> Timerlat IRQ duration: 47.41 us (42.53 %)
> Blocking thread: 50.50 us (45.30 %)
> stress:278226 50.50 us
> Blocking thread stack trace
> -> timerlat_irq
> -> __hrtimer_run_queues
> -> hrtimer_interrupt
> -> arch_timer_handler_phys
> -> handle_percpu_devid_irq
> -> generic_handle_domain_irq
> -> gic_handle_irq
> -> call_on_irq_stack
> -> do_interrupt_handler
> -> el1_interrupt
> -> el1h_64_irq_handler
> -> el1h_64_irq
> -> folios_put_refs
…
> Thread latency: 111.47 us (100%)
The backtrace appears long but everything up to folios_put_refs()
appears preemtible. Then there is the interrupt handler. This looks
okay.
> Max timerlat IRQ latency from idle: 1.98 us in cpu 3
> Saving trace to timerlat_trace.txt
>
>
> OK, here at least something related to virtual memory is happening.
> I still wonder though: How come the latencies are so large? Is the
> raspberry pi platform just not suited to reach lower latencies? Is
> everything working as expected? Are maybe the raspberry pi
> patches responsible for latency sources which are invisible in the
> traces? I there any hope for getting these latencies a little more
> under control?
Based on this trace, I don't see a section which disables preemption/
interrupts and be the reason for the interrupt happening.
One thing that could delay your doing are small caches.
Then there is looking within the system: An inaccurate/ low resolution
clocksource and/ or timer device.
> Kind regards,
> FPS
Sebastian
next prev parent reply other threads:[~2025-01-07 14:39 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-20 13:18 Raspberry Pi 5 and PREEMPT_RT (6.13.0-rc3) Florian Paul Schmidt
2024-12-20 14:05 ` John Ogness
2024-12-20 15:57 ` Florian Paul Schmidt
2024-12-22 10:32 ` Leon Woestenberg
2025-01-08 9:42 ` Florian Paul Schmidt
2025-01-12 15:14 ` Florian Paul Schmidt
2025-01-12 21:30 ` John Ogness
2025-01-13 9:15 ` Florian Paul Schmidt
2025-01-13 10:28 ` Florian Paul Schmidt
2025-01-13 11:09 ` John Ogness
2025-01-13 12:56 ` Florian Paul Schmidt
2025-01-14 10:28 ` Mike Galbraith
2025-02-14 8:31 ` Florian Paul Schmidt
2025-02-14 9:05 ` Mike Galbraith
2025-02-14 12:40 ` gene heskett
2025-02-14 12:06 ` Gabriele Monaco
2025-01-09 8:39 ` Florian Paul Schmidt
2025-01-07 14:39 ` Sebastian Andrzej Siewior [this message]
2025-01-08 9:48 ` Florian Paul Schmidt
2025-01-28 12:30 ` Tim Sander
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=20250107143937.d_ho7CXb@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=linux-rt-users@vger.kernel.org \
--cc=mista.tapas@gmx.net \
/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