Linux 6.12 could feature real-time “PREEMPT_RT” support

Preempt-RT is a modification that allows higher priority tasks to preempt lower priority tasks.

El concept of a real-time system It is not something that has been thought of in recent years in Linux, since the idea of ​​this It started almost 20 years ago, to be exact in 2005. as part of the Realtime-Preempt ("-rt") project with the development of the PREEMPT_RT mode for the Linux kernel.

For those who do not know PREEMPT_RT, they should know that It's a patch for the Linux kernel thatand turns the operating system into a real-time one (real-time). The main goal of PREEMPT_RT is to reduce latency and ensure predictability in task execution, which is crucial in applications that require fast responses.

In simpler words, we can say that PREEMPT_RT allows almost all parts of the kernel to be interrupted, which reduces latency. Unlike a standard kernel, not all sections can be interrupted, which can cause delays in response times.

Since 2015 the project has been under the supervision of the Linux Foundation and so far, the implementation of PREEMPT_RT mode has been offered in the form of external patches. Based on these patches, distributions such as RHEL, SUSE and Ubuntu have created real-time editions of their products, highly in demand in sectors such as financial systems, audio and video processing devices, aviation systems, medicine, robotics, telecommunications and industrial applications, where it is essential to ensure predictable response times to events.

En 2019 began the promotion process of the patches developed in the PREEMPT_RT project to the mainline Linux kernel. In kernel version 5.3, the PREEMPT_RT option was included in the configuration file to enable real-time mode.

The printk bits needed for PREEMPT_RT are in linux-next. This was the last known hurdle for PREEMPT_RT. The RT queue has Also the "atomic console" for the UART 8250 which is not yet in linux-next. This means a "legacy console" behavior as in the case where no printing is done from the atomic context in emergency cases. The 8250 UART controller is the only one which provides “atomic console” support today.

All This work is about to bear fruit, as the full integration of the necessary changes has taken five years and is nearing completion, as it is expected that in version 6.12, the kernel can be compiled in PREEMPT_RT mode without the need to apply additional patches.

It is mentioned that the last obstacle that prevented the enabling of PREEMPT_RT was the lack of support for non-blocking atomic output using the printk function. This functionality has already been adopted in the linux-next branch. Additionally, a non-blocking atomic console is awaited for the 8250 UART controller, the absence of which currently prevents output of emergency messages to the console from code running in atomic contexts.

With printk bits merged, PREEMPT_RT could be enabled on X86, ARM64 and Risc-V. These three merged architectures required changes over the years.
years, leaving me in a position where I have no essential changes in the
tail that would affect them. ARM and POWERPC have some essential patches remaining…

Linux kernel developers They have announced the integration of the last necessary changes in the linux-nex brancht, which will be used to compile version 6.12. These changes will allow the kernel to be compiled with the PREEMPT_RT option, which introduces real-time capabilities.

Once these changes are accepted in the main branch, PREEMPT_RT mode will be available for X86, ARM64 and RISC-V architectures. Support for ARM and POWERPC architectures will be added later, as the necessary patches have not yet been fully integrated.

It is worth mentioning that the proposed changes are not yet final and it is possible that if PREEMPT_RT does not arrive in the 6.12 branch, it will not be integrated until next year in version 6.13.

Finally, if you are interested in knowing more about it, you can check the details in the following link


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.