Skip to main content
A real-time (RT) system provides deterministic, bounded response times to external events. A system qualifies as real-time if it is free of unbounded latency, its worst-case response time can be calculated with precision, and all tasks meet their scheduling deadlines within defined jitter limits. Qualcomm® Linux ships an LTS RT kernel (6.18.x) built on top of the upstream PREEMPT_RT patch set. The RT kernel is targeted at kernel-space processes that require deterministic scheduling. User-space applications cannot achieve RT behavior by using the RT kernel alone; they must also be written with RT scheduling policies (SCHED_FIFO / SCHED_RR) and pinned to isolated CPU cores.

How PREEMPT_RT changes the kernel

The standard Linux kernel (CONFIG_PREEMPT or CONFIG_PREEMPT_VOLUNTARY) allows certain critical sections to run non-preemptibly, causing unbounded scheduling latency spikes. PREEMPT_RT eliminates this by:
ChangeEffect
Converting spinlocks to sleeping mutexes (RT mutexes)Critical sections become preemptible, reducing worst-case latency
Making interrupt handlers threaded by defaultISRs run as kernel threads with a configurable priority, removing them from the non-preemptible interrupt context
Serialising RCU (Read-Copy-Update) callbacksRCU callbacks run in dedicated threads rather than softirq context, reducing jitter
Converting local_lock_t to per-CPU sleeping locksPer-CPU code paths become preemptible
The result is a kernel where nearly every code path can be preempted by a higher-priority RT task, giving deterministic worst-case latencies in the microsecond range on tuned Qualcomm hardware. For the authoritative upstream documentation, see Linux kernel realtime.

Required Kconfig options

The Qualcomm Linux meta-qcom layer enables CONFIG_PREEMPT_RT by default through the rt.config configuration fragment included in the linux-qcom-rt_6.18.bb recipe. The following table describes the key Kconfig options and their role: Table: RT kernel Kconfig options
OptionDefault in RT buildDescription
CONFIG_PREEMPT_RTyEnables full kernel preemption. Mandatory for RT.
CONFIG_NO_HZ_COMMONyInfrastructure for tickless idle and full-tickless operation. Required by NO_HZ_FULL.
CONFIG_NO_HZ_FULLySuppresses scheduling-clock interrupts on CPUs with a single runnable task. Reduces jitter on isolated RT cores.
CONFIG_CPUSETSyAllows grouping CPUs into sets for affinity control. Required for isolating RT tasks to dedicated cores.
CONFIG_CPU_ISOLATIONyEnables isolcpus= kernel parameter support to remove cores from the general scheduler.
CONFIG_HZ_1000ySets the kernel timer frequency to 1000 Hz (1 ms tick period). Higher HZ values increase scheduling granularity at the cost of more timer overhead.
Verify that these options are active on a running RT system:
zcat /proc/config.gz | grep -E "CONFIG_PREEMPT|CONFIG_NO_HZ|CONFIG_CPUSETS"
Expected output:
# CONFIG_PREEMPT_NONE is not set
# CONFIG_PREEMPT_VOLUNTARY is not set
# CONFIG_PREEMPT is not set
CONFIG_PREEMPT_RT=y
CONFIG_NO_HZ_COMMON=y
CONFIG_NO_HZ_FULL=y
CONFIG_CPUSETS=y

RT vs standard kernel trade-offs

Choosing the RT kernel involves accepting specific trade-offs:
DimensionStandard kernelRT kernel
Worst-case scheduling latencyUnbounded (μs to ms)Bounded (low μs on tuned hardware)
ThroughputHigher, fewer context switchesSlightly lower, more preemption points
Power consumptionLower in idleHigher, NO_HZ_FULL keeps RT cores active
Debugging complexityStandard toolsRT-specific tools (cyclictest, ftrace with hwlat_detector)
Use caseGeneral-purpose, multimediaIndustrial control, robotics, time-sensitive networking
The RT kernel is supported on all Qualcomm Linux hardware platforms (QCS6490, IQ-9075, IQ-8275, IQ-615). Latency numbers depend on the specific SoC, CPU topology, and tuning applied. Always measure on target hardware and do not rely solely on simulation results.

Verify RT is active

After booting the RT kernel, confirm full RT preemption is enabled:
# Kernel version string includes -rt suffix
uname -r
# Example: 6.18.0-rt1+

# Confirm PREEMPT_RT in the version banner
cat /proc/version

# Verify the Kconfig flag
zcat /proc/config.gz | grep CONFIG_PREEMPT_RT
# Expected: CONFIG_PREEMPT_RT=y