20 years later, real-time Linux makes it to the kernel
zdnet.com
zdnet.com
It's a long time overdue and congrats to the real-time Linux time for the tenacity. The fact that it's included after eBPF being accepted to the Linux kernel but better late than never. Now we can preempt eBPF codes to make it even faster and responsive.
It will be very interesting to run real-time Linux on Raspberry Pi interfacing with Pi Pico for IoT monitoring, sensing and actuating communicating over bidirectional BiSS interface [1].
[1] BiSS: High speed open-source digital interface for IoT sensors and actuators:
I remember I had some nasty sound distortion issues on a Windows VFIO VM and it came down to events/interrupts not being handled quickly enough. I wonder what happens with an RT kernel and the VM thread having high priority in that situation.
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/lin...
It's a latency vs throughput trade-off usually. Ideally you'd want both to improve, but the more you switch between the processes, the more time you waste on busywork and cache invalidation rather than what the processes want to achieve. For example if RT wants to guarantee that your audio is more in sync, you're going to switch from your app to the audio system more often.
The real trade-off is the overhead required to make all kernel operations potentially safe WRT maximum wait times.
...and that won't change now either. You'll just be able to build the RT kernel from the same upstream sources as the regular one.
## install mainline, bleeding, secure, stable, and stable realtime, mainline realtime
pacman -S linux linux-zen linux-hardened linux-lts linux-rt-lts, linux-rt
## and I guess, soon to be: linux-rt
And then add the following 5 bootloader entries as separate files #/boot/loader/entries/linux{,-zen,-hardened,-lts,-rt-lts,-rt}.conf
title Linux {Main,Zen,Hard,LTS,RT-LTS,RT}
linux /vmlinuz-linux{,-zen,-hardened,-lts,-rt-lts,-rt}
initrd /initramfs-linux{,-zen,-hardened,-lts,-rt-lts,-rt}.img
options root=PARTUUID="the-part-uuid-of-your-root-partition" rw
and after those 5 files are in place, do a `bootctl update`The sheer complexity of making much of kernel space preemptable is scary. There's too much running in kernel space.
When was that? I used it over a decade ago, and it worked pretty well even then.
https://help.ubuntu.com/community/UbuntuStudio/RealTimeKerne...
> Security Implications
> All it would take is one malicious process to execute and take advantage of the real-time code to completely lock-out a user from their machine, turning that machine into part of a botnet or other malicious purpose. Real-Time processes have the potential to completely take-over a machine. This is the number one reason Ubuntu does not carry a Real-Time kernel.
There seems to be a pretty big leap from beginning of that sentence to the end, I personally wouldn't consider local DoS a problem.
The page goes on:
> A patch does exist to enable process to have real-time process access to any process requesting it.
According to the sched(7) man page, this has never been the case: before 2.6.12, the process had to have CAP_SYS_NICE; after, it was limited by policy through RLIMIT_RTPRIO. I guess it's possible that this was not the case for the original out-of-tree patch set.
But it's been there for many years, well before the 2020 edit that added the bulk of the current text on that wiki page.
So this means there are no critical sections or interrupts being disabled anywhere in kernel code when PREEMPT_RT is enabled?
FYI, there appears to be minor one, too: it's called Linux.