# switch governor to performance for all cores                                                            
for i in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor; do echo performance > $i; done

# kernel parameters
mitigations=off nosmt

# deactivate RT Throtteling
echo -1 >/proc/sys/kernel/sched_rt_runtime_us

# replace std::mutex with librtpi::pi_mutex_t [4]

# set saftbusd to RR 60 (in saftbus.service)
# you need to be higher in priority than the IRQ threads (network, USB, ....)
CPUSchedulingPolicy=rr
CPUSchedulingPriority=60

# set your RT application to the same prio and policy as saftbusd
# this is my test program call
while true; do chrt -r 60 saft-roundtrip-latency tr0 10000 histo1.txt 1234; chrt -o 0 python3 findmax.py histo1.txt; done
while true; do chrt -r 60 saft-roundtrip-latency tr0 10000 histo2.txt 1235; chrt -o 0 python3 findmax.py histo2.txt; done

# this is an example stress call
./stress-ng --cpu 4 --iomix 4 --vm 4 --vm-bytes 442M --fork 4 --timer 4 -t 20m
./stress-ng --cpu 4 --iomix 4 --vm 4 --vm-bytes 2G --fork 4 --timer 4 --affinity 2 -t 20m

# change RT Prio for a running process
# Policy Round Robin
chrt -r -p PRIO PID
# Policy FIFO
chrt -f -p PRIO PID

-- StefanRauch - 2025-11-13
ISorted descending Attachment Action Size Date Who Comment
findmax.py.txttxt findmax.py.txt manage 504 bytes 2025-11-13 - 09:51 StefanRauch findmax python script for RT test
Please login to edit this topic
Topic revision: r5 - 2025-12-17, DietrichBeck
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding GSI Wiki? Send feedback | Legal notice | Privacy Policy (german)