By [Your Name], Senior Journalist and Editor

The Linux kernel is set torevolutionize its real-time capabilities with the upcoming 6.12 release, which will include support for real-time scheduling out-of-the-box. This significant development, driven by a PR that enables PREEMPT_RT across all supported architectures, promises to benefit a wide range of applications, from desktop userexperience to critical systems like avionics, robotics, automotive, and communication.

PREEMPTRT, a set of patches for Linux developed since 2005, provides the foundation for hard and soft real-time computing. Itmakes the Linux kernel fully preemptible, ensuring deterministic timing and low latency responses to external events on architectures like x86, x8664, RISC-V, and ARM64. Previously, users had to manuallypatch their Linux kernels with PREEMPTRT. Now, simply enabling the CONFIGPREEMPT* option during compilation will suffice to build a real-time Linux kernel.

The integration of PREEMPT_RT into the mainline kernel signifies a significant step forward, as it involves refining numerous functionalities to ensure seamless operation in mostscenarios. One crucial aspect addressed is the printk function, vital for kernel development but not fully real-time ready. This function, developed by Linus Torvalds, helps developers pinpoint the exact location of crashes. However, its older implementation introduced delays that hampered low-latency goals. These delays have now been eliminated.

Before the inclusion of PREEMPT_RT, the easiest way to run real-time Linux was through Ubuntu Pro, a version available for free for personal and small-scale commercial use, but requiring payment for more than five machines. It’s important to note that real-time is not about performance but rather about predictable(deterministic) task preemption. Certain applications rely on operations happening within a specific timeframe after external events, making real-time functionality crucial.

While the standard Linux kernel is optimized for maximum hardware utilization and fair time allocation among all processes, it can also be configured to minimize power consumption or adapt to specific task requirements (known as utilization capping). Hacker News user femto highlights that running real-time Linux can reduce interrupt latency from double-digit milliseconds to single-digit milliseconds per CPU core. However, this requires running the scheduler with a real-time policy (SCHEDFIFO or SCHEDRR) to prevent hardware events like touchpad touchesfrom hindering real-time tasks such as audio playback or 3D gaming.

Other users have reported improvements in user experience with the real-time kernel, such as the elimination of occasional Gnome freezes and smoother overall performance. The inclusion of real-time scheduling in the mainline Linux kernel promises to usher in a new era ofdeterministic and responsive computing, benefiting both critical applications and everyday users.

References:


>>> Read more <<<

Views: 0

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注