ttshaw1 2 hours ago | next |

Anyone know if this will have any impact on low-latency linux audio? The article calls out JACK, but I'd guess the new standard for musicians recording on Linux is pipewire. So if pipewire either found some workaround or has been enabling a real-time module, I suppose those end users wouldn't see a difference.

teleforce 20 hours ago | prev | next |

Wow finally, it seems like yesterday when first encountered the real-time Linux kernel proposal.

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:

https://news.ycombinator.com/item?id=41516826

penguin_booze an hour ago | prev | next |

> Unlike general-purpose operating systems like Windows or macOS.

FYI, there appears to be minor one, too: it's called Linux.

Animats a day ago | prev | next |

Nice. Real-time Linux used to be a joke, but apparently now it works.

The sheer complexity of making much of kernel space preemptable is scary. There's too much running in kernel space.

goodcanadian 20 hours ago | root | parent |

Real-time Linux used to be a joke, but apparently now it works.

When was that? I used it over a decade ago, and it worked pretty well even then.

akikoo 9 hours ago | root | parent |

Here's when:

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.

PhilipRoman 6 hours ago | root | parent |

>completely lock-out a user from their machine, turning that machine into part of a botnet or other malicious purpose

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.

tetris11 8 hours ago | prev | next |

If anyone wants to try multiple kernels on their machine, here's how you'd do it with systemd-boot

    ## 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`

zaptheimpaler 20 hours ago | prev | next |

Wow that sounds like a hell of an achievement. Here is the commit to the print_k function they mentioned as the final hurdle [1]. I have no idea what it does but maybe someone else here does. I wonder if the RT stuff will remain behind a config flag or become the default eventually. Is there any reason to not just have RT on by default?

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...

viraptor 20 hours ago | root | parent |

> Is there any reason to not just have RT on by default?

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.

cwillu 19 hours ago | root | parent |

That's a bit of a red-herring though, as the audio system will only preempt other processes if it's configured for very small buffers and given real-time permissions. A server's audio subsystem won't preempt actual work because a server won't _have_ an audio subsystem running, let alone be configured for sub-millisecond latency.

The real trade-off is the overhead required to make all kernel operations potentially safe WRT maximum wait times.

viraptor 19 hours ago | root | parent |

This is a qualified example. Yes, if you're not doing audio, audio is not going to interrupt. But that's a moot point...

ahazred8ta 5 hours ago | prev | next |

A buddy of mine used Trinux RTK and Wind River RTLinux in a commercial audio console product back in the 00's. There were several efforts back then.

londons_explore 21 hours ago | prev | next |

> the Linux kernel is fully preemptible,

So this means there are no critical sections or interrupts being disabled anywhere in kernel code when PREEMPT_RT is enabled?

oasisaimlessly 5 hours ago | root | parent |

I would assume it means something a bit weaker: that all critical sections have a bounded length, being guaranteed to end after a given finite number of clock cycles.

nirav72 16 hours ago | prev | next |

I don’t know much about RTOS. But am aware that JPL uses VxWorks for planetary rovers and orbiters. So wondering if JPL or other entities will replace VxWorks with a Linux RTOS implementation at some point.

skovati 15 hours ago | root | parent |

If you haven't already, look into the avionics and flight software of the Ingenuity helicopter. First time Linux ran on Mars!