Re: Raspberry Pi 5 and PREEMPT_RT (6.13.0-rc3)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi again!

On 22/12/2024 11:32, Leon Woestenberg wrote:
You could consider using isolated CPU cores, which should give you
much lower latencies, if you have full control over the application
logic.

OK, I got around to playing with isolcpus. As a first attempt I added

isolcpus=1,2,3

to my kernel commandline and tried

stress -m 1 --vm-stride 16 --vm-bytes 512000000 --vm-keep -c 1

and it ran on core 0 maxxing it out. So, all fine and dandy up to
this point. Then I went on to run cyclictest on the isolated core:

sudo cyclictest  -m -p 95 -a 1,2,3 -t 3

But I get enormous latencies:

# /dev/cpu_dma_latency set to 0us
policy: fifo: loadavg: 2.98 3.08 2.95 3/222 134837

T: 0 (134706) P:95 I:1000 C:   4824 Min:      1 Act:    3 Avg:    8 Max:     518
T: 1 (134707) P:95 I:1500 C:   3215 Min:      1 Act:    1 Avg:    8 Max:     566
T: 2 (134708) P:95 I:2000 C:   2411 Min:      1 Act:    1 Avg:    9 Max:     503

Side note: I get these enormous latencies also without cpu
isolation and this particular stress test (albeit with -c 4 and -m 4
- so the stressor running on all cores.) But I would have expected
the core isolation to mitigate this somewhat. Here's the really
surprising thing though. If I run

sudo cyclictest  -m -p 95 -a 0,1,2,3 -t 4

then I get these enormous latencies on cores 1,2 and 3 but not on
core 0:

# /dev/cpu_dma_latency set to 0us
policy: fifo: loadavg: 2.50 2.83 2.88 3/223 139478

T: 0 (139313) P:95 I:1000 C:   5881 Min:      2 Act:    3 Avg:    3 Max:      10
T: 1 (139314) P:95 I:1500 C:   3920 Min:      1 Act:    1 Avg:    7 Max:     419
T: 2 (139315) P:95 I:2000 C:   2940 Min:      1 Act:    1 Avg:    7 Max:     480
T: 3 (139316) P:95 I:2500 C:   2352 Min:      1 Act:    1 Avg:    9 Max:     433

And _that_ is really strange from my understanding. What is this
raspberry pi 5 doing? O_o

10 us would be an excellent worst case latency ;)

And here's another strange thing: The latencies depend a lot on the
--vm-stride argument to stress. 16 seems to be the value that maximizes
these latencies. IF I go either to higher (32, 64, ...) or lower (8, 4,
2, 1) values the latencies disappear almost completely.

Now I am more puzzled than before.

Kind regards,
FPS




[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux