cyclictest usage, and the known limitations of
the Qualcomm Linux RT kernel.
Pre-test system tuning
Apply the following configuration steps on the target device before running any RT validation test. Tuning must be reapplied after every reboot unless automated via a systemd service (see OTA and upgrade considerations).QCS6490 · IQ-9075 · IQ-615
These platforms isolate CPU 7 as the RT core. CPUs 0–6 are housekeeping CPUs. 1. Disable timer migrationIQ-8275
This platform isolates CPU 3 as the RT core. CPUs 0–2 and 4–7 are housekeeping CPUs (mask0xF7).
1. Disable timer migration
Install rt-tests via Yocto
Thecyclictest utility is part of the upstream
rt-tests suite.
Include it in the Yocto image by appending to IMAGE_INSTALL in your layer
configuration:
cyclictest is available at
/usr/bin/cyclictest.
Run cyclictest
cyclictest measures timer latency by scheduling a periodic thread and
recording how late each wakeup occurs relative to the requested interval.
QCS6490 · IQ-9075 · IQ-615 (RT core: CPU 7)
IQ-8275 (RT core: CPU 3)
| Flag | Value | Meaning |
|---|---|---|
-a | 7 or 3 | Pin test threads to the isolated RT CPU |
-t | 1 | Run 1 measurement thread |
-m | — | Lock all memory pages (prevent page-fault jitter) |
-l | 100000000 | Number of measurement loops (long-duration test) |
-i | 1000 | Timer interval in microseconds (1 ms) |
-p | 99 | Thread RT priority (SCHED_FIFO, priority 99) |
-h | 100 | Build a latency histogram up to 100 µs |
Max field is the worst-case latency in microseconds. On a properly
tuned system this should remain below 100 µs on QCS6490, IQ-9075, and
IQ-615, and below the same threshold on IQ-8275 with tuning applied.
For complete documentation and additional test tools (hackbench,
oslat, pi_stress), see
RT-Tests documentation.
Known limitations
Kernel space onlyPREEMPT_RT provides deterministic scheduling for kernel threads and
interrupt handlers. User-space applications must explicitly opt in to RT
scheduling using SCHED_FIFO or SCHED_RR policies (via sched_setscheduler)
and must be pinned to isolated CPU cores using taskset or cpuset. A
user-space process running with SCHED_OTHER (default) on a shared CPU will
not benefit from the RT kernel.
Thermal throttling
Qualcomm SoCs apply thermal mitigation that reduces CPU frequency when the
SoC temperature rises. Even with the performance governor set, thermal
events can temporarily lower the CPU frequency of the RT core, introducing
latency spikes. On long-duration production tests, monitor thermal state:
device_initcall and can
take several seconds, briefly stressing the memory bus and introducing
latency spikes in early-boot RT measurements. Run RT validation only after
all remoteproc subsystems have fully started:
isolcpus, nohz_full, rcu_nocbs) is therefore
simpler than on x86 where there are no sibling threads sharing execution resources
with the RT core.
sched_rt_runtime_us and watchdog
Setting sched_rt_runtime_us to -1 (unlimited) disables the RT throttle
that prevents RT tasks from starving CFS tasks. This is required for
deterministic latency but means a runaway RT task can lock the system. Enable
the RT kernel watchdog (CONFIG_DETECT_HUNG_TASK=y, hung_task_timeout_secs)
in production configurations to mitigate this risk.
EFI runtime services
When PREEMPT_RT is enabled, the kernel’s EFI_DISABLE_RUNTIME Kconfig option
defaults to y (see drivers/firmware/efi/Kconfig). This intentionally disables
EFI runtime services to eliminate the large, unpredictable latency that UEFI
firmware calls can introduce into the RT scheduling path.
On Qualcomm platforms this has practical consequences: EFI runtime services are
required for enabling user to configure boottime dtb overlay (writing the
VendorDtbOverlays EFI variable). EFI runtime services currently is enabled in
yocto configs by passing efi=runtime on the kernel command line by appending
the following parameter to RT_KERNEL_CMDLINE in
conf/machine/include/qcom-common.inc:

