Detailed Comparison of Linux Real-Time Performance Testing for the Rockchip RK35XX Series (PREEMPT_RT and Xenomai)

Detailed Comparison of Linux Real-Time Performance Testing for the Rockchip RK35XX Series (PREEMPT_RT and Xenomai)Industrial control, industrial gateways, rail transportation, and energy power scenarios all require a stable and reliable “real-time operating system”. RT-Linux, as an open-source real-time operating system, possesses characteristics such as a real-time kernel, open-source, free, and comprehensive functionality, perfectly meeting the needs of industrial scenarios.This article is based on the Rockchip RK series development boards from Haptic Intelligence, which underwent 240 hours of real testing! It expands on the real-time system of RT-Linux with two major kernels: PREEMPT_RT and Xenomai real-time data evaluation!Detailed Comparison of Linux Real-Time Performance Testing for the Rockchip RK35XX Series (PREEMPT_RT and Xenomai)Detailed Comparison of Linux Real-Time Performance Testing for the Rockchip RK35XX Series (PREEMPT_RT and Xenomai)Detailed Comparison of Linux Real-Time Performance Testing for the Rockchip RK35XX Series (PREEMPT_RT and Xenomai)Introduction to the RT-Linux Kernel

  • PREEMPT_RT

PREEMPT_RT is a real-time kernel patch for RT-Linux that significantly reduces system latency peaks (as low as microsecond level) by enhancing kernel preemption capabilities, threading interrupt handling, and modifying lock mechanisms, thereby reducing “non-preemptive” scenarios, allowing Linux to better adapt to industrial control, robotics, autonomous driving, and other scenarios with strict real-time response requirements. Its core functions have gradually been integrated into the mainline Linux kernel and can be enabled directly through configuration.

  • Xenomai

Xenomai is a real-time development framework designed for embedded systems, providing nanosecond-level hard real-time response capabilities through a “dual-kernel” architecture (running a real-time microkernel alongside the Linux kernel), while allowing real-time tasks to work in conjunction with Linux system services. It is widely used in industrial automation, robotics, aerospace, and other scenarios with high real-time requirements, supporting various hardware architectures and compatible with POSIX real-time interfaces.

  • Real-Time Testing Environment

Test motherboard: Haptic Intelligence’s Rockchip RK35XX series development boards, including RK3506, RK3562, RK3568, RK3576, RK3588.

Software testing tool: Cyclictest (operated via serial command)

Detailed Comparison of Linux Real-Time Performance Testing for the Rockchip RK35XX Series (PREEMPT_RT and Xenomai)Detailed Comparison of Linux Real-Time Performance Testing for the Rockchip RK35XX Series (PREEMPT_RT and Xenomai)RT-Linux System – PREEMPT_RT Kernel Testing

Five development boards, RK3506, RK3562, RK3576, RK3568, RK3588 from Haptic Intelligence, were subjected to continuous instruction testing for 24 hours under three conditions: CPU idle, full load + core isolation, with the following data:

  • RK3506 system kernel: Linux Kernel 6.1.84

Detailed Comparison of Linux Real-Time Performance Testing for the Rockchip RK35XX Series (PREEMPT_RT and Xenomai)

  • RK3562 – system kernel: Linux Kernel 5.10.226

Detailed Comparison of Linux Real-Time Performance Testing for the Rockchip RK35XX Series (PREEMPT_RT and Xenomai)

  • RK3568 system kernel: Linux Kernel 5.10.209

Detailed Comparison of Linux Real-Time Performance Testing for the Rockchip RK35XX Series (PREEMPT_RT and Xenomai)

  • RK3576 system kernel: Linux Kernel 6.1.99

Detailed Comparison of Linux Real-Time Performance Testing for the Rockchip RK35XX Series (PREEMPT_RT and Xenomai)

  • RK3588 – system kernel: Linux Kernel 5.10.226

Detailed Comparison of Linux Real-Time Performance Testing for the Rockchip RK35XX Series (PREEMPT_RT and Xenomai)

  • RK series development boards PREEMPT_RT real test data comparison

Detailed Comparison of Linux Real-Time Performance Testing for the Rockchip RK35XX Series (PREEMPT_RT and Xenomai)Detailed Comparison of Linux Real-Time Performance Testing for the Rockchip RK35XX Series (PREEMPT_RT and Xenomai)Detailed Comparison of Linux Real-Time Performance Testing for the Rockchip RK35XX Series (PREEMPT_RT and Xenomai)RT-Linux System – Xenomai Kernel Testing

Xenomai testing method is consistent with PREEMPT_RT, with the following data:

  • RK3506

Detailed Comparison of Linux Real-Time Performance Testing for the Rockchip RK35XX Series (PREEMPT_RT and Xenomai)

  • RK3562

Detailed Comparison of Linux Real-Time Performance Testing for the Rockchip RK35XX Series (PREEMPT_RT and Xenomai)

  • RK3568

Detailed Comparison of Linux Real-Time Performance Testing for the Rockchip RK35XX Series (PREEMPT_RT and Xenomai)

  • RK3576

Detailed Comparison of Linux Real-Time Performance Testing for the Rockchip RK35XX Series (PREEMPT_RT and Xenomai)

  • RK3588

Detailed Comparison of Linux Real-Time Performance Testing for the Rockchip RK35XX Series (PREEMPT_RT and Xenomai)

  • RK series development boards Xenomai real test data comparison

Detailed Comparison of Linux Real-Time Performance Testing for the Rockchip RK35XX Series (PREEMPT_RT and Xenomai)Detailed Comparison of Linux Real-Time Performance Testing for the Rockchip RK35XX Series (PREEMPT_RT and Xenomai)Detailed Comparison of Linux Real-Time Performance Testing for the Rockchip RK35XX Series (PREEMPT_RT and Xenomai)Conclusion AnalysisIn the case of processor performance differences, the Haptic Intelligence RK3506 (Linux 6.1 kernel) surprisingly exhibited higher real-time latency than the better-performing RK3568 (Linux 5.10 kernel). The main reasons verified are as follows:(1) Scheduler Improvements

Linux 6.1 has made several optimizations to the scheduler (such as CFS), including improvements to load balancing algorithms (like fair group scheduling optimization), which have reduced task migration delays.

(2) Enhanced Interrupt Threading

Linux 6.1 has improved the priority management of threaded interrupts (IRQ threads), ensuring that high-priority interrupts can preempt low-priority threads more quickly. For example, optimizations in irq_work_queue() have reduced interrupt handling delays.

(3) Lock Mechanism Optimization

Linux 6.1 has introduced finer-grained rtmutex lock optimizations, reducing the waiting time for RT tasks competing for locks. For instance, the “lock stealing” mechanism avoids unnecessary wake-up operations.

(4) Preempt-RT Patch Version

Linux 6.1 integrates updated RT patches that fix timer race conditions and priority inheritance bugs found in earlier versions of 5.10 (such as RK3568’s 5.10.209).

Detailed Comparison of Linux Real-Time Performance Testing for the Rockchip RK35XX Series (PREEMPT_RT and Xenomai)Detailed Comparison of Linux Real-Time Performance Testing for the Rockchip RK35XX Series (PREEMPT_RT and Xenomai)Product IntroductionHaptic Intelligence RK3506 development board/core board, equipped with the Rockchip RK3506B/RK3506J low-power multi-core heterogeneous processor (3 cores [email protected] + M0, full load 0.65W), dual CAN FD, dual Ethernet ports, 6 serial ports, and supports extreme environments from -40℃ to 85℃, providing a cost-effective domestic solution under 100 yuan to assist in the efficient upgrade of industrial control, IoT, and smart devices! (Click the video to unlock the RK3506 core board, a high cost-performance solution under 100 yuan) (Click the video to experience the technical charm of the RK3506 Star Flash development board)ENDDetailed Comparison of Linux Real-Time Performance Testing for the Rockchip RK35XX Series (PREEMPT_RT and Xenomai)

Leave a Comment