The 6.12 kernel UHD630 graphics worked when not compiled for realtime but just voluntary preemption. So I have filed Bug 219510. I suspect the kernel team will refer me to Intel since they actually maintain this driver, then Intel will say well it worked when the kernel people didn't hack it for real time and it will end up going nowhere but time will tell. Without a working display, I can't really test KVM/QEMU so will have to wait for action on this bug.
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?
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.
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.
Actually I think its the other way for gaming: If you have consistent input delay, it will not feel sluggish. Same why consistent 30 fps feels better than varying 31 to 39 fps. Similar for gaming, especially if you play speedrun or 1vs1 fighting games, you would want to have consistent delay. However, if that adds too much delay its probably counterproductive. But for single player games, a consistent delay is the opposite of sluggish.
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@thingsiplay As I previously stated, a normal preemptive kernel will generally provide <1ms latency. RT does provide the possibility of lower latency and not inconsistent as you suggest unless you are resource saturated.
With respect to gaming, the answer is a definite "maybe". Here is the thing with a real time kernel, context switching is expensive, and especially so when going between kernel and userland mode. This is because you have to save/restore all the registers on the stack so there are a lot of memory cycles involved in a context switch. A realtime kernel increases context switching a LOT so you're going to eat more CPU than you otherwise would but on the other hand, critical things will get attended to in a more timely manner. So whether the latency or the overall computational efficiency is more important will make the difference in gaming. Also to some degree hardware, most games will only use 4 cores or so, a few more than that but most only about 4, so if you've got an 18 core machine, you have plenty of core for the extra kernel overhead, it is more likely to benefit than if you're on a 4-core machine with all the cores already saturated.
@thingsiplay @lemmy.ca A normal preemptive kernel with 1000HZ tick will usually provide sub 1ms latency which for most audio is adequate.
That said, I just built 6.12.0 and the display drivers for UHD630 graphics appear to be broken, at least when compiled for realtime. I am going to go re-compile it normal pre-emptive as I normally do and see if it has the same issues. It booted, and got up to the point where it executed /etc/rc.local because it turned on my keyboard leds, but the screen never displayed.
The issues are mainly under high CPU load. A RT kernel will continue to maintain low latency without xruns but a normal kernel may not. The compromise option is full preemption which generally does a good job but doesn't have the issues with throughput that can occur with a RT kernel.
Although maybe you meant full when you indicated a preemptive kernel (voluntary preemption is still the default I believe but it's kernel dependent).
But you'd still be crazy to use it for either of those purposes, given how safety critical they are. I expect it would be more likely used in robots like Spot, or manufacturing robots.
I've avoided RT thus far because it was incompatible with KVM/QEMU. Am curious if this is still the case. Guess I can compile and install on my workstation and see
if my virtual machines still work.
I'm still a bit of a Linux noob but when I updated my kernel to the latest a few months ago it broke VMware and I couldn't get it to work again . I don't remember the exact errors at this point but I determined it was definitely a kernel issue . I'm using Ubuntu for now btw .