Software Engineer & DevOps Architect. Mbin contributor (and creator of the fork).

He/him 🇳🇱🏳️‍🌈

Mastodon - Matrix - Telegram - Homepage - Donate me

  • 0 Posts
  • 119 Comments
Joined 1 year ago
cake
Cake day: June 20th, 2023

help-circle
  • I got this back from ChatGPT (most likely false info!):

    ChatGPT response (you have been warned)

    The compromise for integrating PREEMPT_RT into the Linux mainline kernel, including the handling of printk, required several changes and concessions over time. These compromises made it possible to finally integrate real-time (RT) capabilities while maintaining the overall philosophy and structure of the Linux kernel. Key Compromises Made:

    1. Soft-Real-Time Focus:

      One of the biggest compromises was accepting that Linux would focus on soft real-time capabilities instead of hard real-time guarantees. This was crucial for widespread acceptance in the mainline kernel, as hard real-time guarantees were too difficult to meet without significant changes that would have disrupted the kernel’s general-purpose use cases. PREEMPT_RT was designed to offer deterministic behavior with reduced latencies, but it doesn’t provide the strict guarantees of traditional hard real-time systems like VxWorks or QNX.

    2. printk Latency Handling:

      Non-blocking printk: One compromise involved updating printk to avoid long blocking during logging operations. It was changed to be more asynchronous, reducing the impact on real-time scheduling. Deferred printing: Another approach was to defer the actual printing of log messages to avoid introducing large latencies in time-critical paths. The goal was to prevent printk from stalling critical tasks, especially those with real-time priority.

    3. Voluntary Preemption Points:

      Voluntary preemption was introduced, allowing kernel code paths to insert preemption points that allow the scheduler to preempt running tasks, improving latency. However, this does not guarantee immediate preemption, which is another compromise compared to true hard real-time systems. These preemption points had to be carefully placed to balance performance and responsiveness without destabilizing the general-purpose kernel.

    4. Threaded Interrupts:

      Another significant compromise was the conversion of hard IRQs (interrupts) into threaded interrupts. While this allows real-time tasks to take precedence over hardware interrupts (which would traditionally have a higher priority), it involves some overhead and performance trade-offs. Not all interrupts could be threaded easily, and this change required reworking many drivers to ensure that they were compatible with threaded interrupts.

    5. Preemptible Spinlocks:

      Spinlocks in the kernel traditionally prevent preemption. To enable real-time preemption, spinlocks were made preemptible, allowing real-time tasks to preempt even code holding spinlocks. This change wasn’t trivial, as it involved significant reworking of kernel locking mechanisms to ensure the system remained stable and avoided deadlocks, without degrading performance in non-real-time scenarios.















  • Framework laptop 13 is just a bit above 1kg. It’s 1.3kg… It is worth weighing this choice (you get the joke? hah, guhmm). If you really need something super compact and very light, maybe a old-school “netbook” will do.

    Like the GPD WIN Mini (7 inch, that is super compact, right?)… But really get a Framework laptop hehe.