120

cross-posted from: https://lemmy.zip/post/26533086

Linux kernel 6.12 is one of the most significant releases of the year, delivering a feature nearly 20 years in the making: true real-time computing.

you are viewing a single comment's thread
view the rest of the comments
[-] thingsiplay@beehaw.org 18 points 3 days ago

As I understand it, most kernel operations can’t be interrupted (i.e., they’re non-preemptible). But PREEMPT_RT allows high-priority tasks to interrupt lower-priority ones near-instantly. For specific types of tasks this improves response times and thus performance.

I never looked into the details of realtime Kernel. I know it is or was used for professional realtime audio mixing and recording and such. Besides that, if this improves response times, would gaming benefit from this? What are downsides for using a realtime Kernel for gaming?

[-] CameronDev@programming.dev 34 points 3 days ago* (last edited 3 days ago)

Realtime doesn't necessarily mean low latency, it means consistent latency.

So if the latency from and input takes 1s, that is realtime, as long as its always 1s.

Typically for gaming you want the lowest latency possible, and at least historically, that meant not realtime.

Edit: Some examples with made up numbers:

Airbag: you want an airbag to go off EVERY time, and if that means it takes 10ms, thats usually OK. RT guarantees that your airbag will go off 10ms after a crash every time.

Games: you want your inputs handled ASAP, ideally <5ms, but if one or two happen after 100ms, you'll likely not notice. If you enable RT, maybe all your inputs get handled after 10ms consistently, which ends up feeling sluggish.

Unless you know you need RT, you probably dont actually want it.

[-] sxan@midwest.social 8 points 3 days ago

Realtime doesn't necessarily mean low latency, it means consistent latency.

This is such a critical distinction which can be counter-intuitive. In this case, their game may run slower, they just won't get lags resulting from local resource contention. And even that statement has caveats.

One of the biggest difference between self-taught developers and ones with CS degrees is that the ones with degrees usually understand a lot of important theory, such as O(1) means constant time, not necessarily fast time.

[-] CameronDev@programming.dev 2 points 3 days ago

It doesn't help that its not well named, realtime makes it sound fast.

One of the few things I remembered from my degree was the realtime programming course, because we got to program a model train set in Ada, on a 286(?), running on floppies. This was in ~2015, so ancient hardware even then, and it was slow, but it was "realtime".

Interestingly, my compsci degree never covered O notation, so that I've had to pick up along the way :/

[-] sxan@midwest.social 2 points 2 days ago

Interestingly, my compsci degree never covered O notation, so that I've had to pick up along the way :/

Really‽ That's a shame. It's one of the topics that, in my programming career, was regularly valuable and used. That, set theory, and discrete math have an been broadly applicable even in the most banal applications. It's a shame if it's not part of the CIS curriculum at some universities.

load more comments (9 replies)
load more comments (12 replies)
this post was submitted on 19 Nov 2024
120 points (99.2% liked)

Linux

5278 readers
364 users here now

A community for everything relating to the linux operating system

Also check out !linux_memes@programming.dev

Original icon base courtesy of lewing@isc.tamu.edu and The GIMP

founded 1 year ago
MODERATORS