5 ms·
I'm afraid that you'd need a realtime OS to implement a compositor with the suggested properties.
by amelius 6y ago
I'm afraid that you'd need a realtime OS to implement a compositor with the suggested properties.
- zokier 6y agoI'm in the opinion that real-time desktop is already overdue. I can understand that in the olden days the perf benefit from dropping latency guarantees were worth it (classic latency vs throughput optimization), especially on servers where current operating systems draw their lineage (NT and UNIX). But these days with beefy, even overpowered CPUs, and 25 years of OS/real-time research later I would imagine that we would be in a place that the tradeoff would look different. Of course just slapping RT kernel in a modern system alone would not do much good. The whole system needs to be thought with RT in mind, starting from kernel and drivers through toolkits/frameworks and services up to the applications themselves. But ultimately the APIs for application developers should be nudging people to do the right things (whatever those would be)
- cycloptic 6y agoWe're probably already halfway there with modern apps, if you consider that any program with hardware-accelerated graphics is already performing rendering as a stateless operation in a separate thread pool running on an entirely different processor.
- flohofwoe 6y agoYou need to go down to the hardware even, a realtime kernel running on mainstream CPUs and GPUs might not be enough (I wonder if a realtime system can even be built with current mainstream CPUs and GPUs): The video systems in 8-bit home computers only worked because the entire system provided "hard realtime" guarantees. CPU instructions always were the same number of cycles and memory access happened at exactly defined clock cycles within an instruction. Interrupt timing was completely predictable down to the clock cycle, etc etc. Modern computers get most of their performace because they dumped those assumptions and as a result made timings entirely unpredictable (inside the CPU via caches, pipelining, branch prediction, etc etc...), and between system components (e.g. CPU and GPU don't run cycle-locked with each other).
- raphlinus 6y agoI think most modern OS kernels support realtime threads with a guarantee strong enough to support this kind of workflow. As Paul Davis points out in a different comment, the latency needs of audio and video are actually more similar than they are different, and pro audio is possible (though still harder than it should be). But I don't want to underestimate the engineering challenges either. You'd have to make this stuff actually work.
- cycloptic 6y agoI wouldn't hold my breath for this happening anytime soon on Linux. At the very least the GPU scheduler would probably need some significant enhancements, and it would need to be exposed to userspace, and work would need to be done to move all the existing drivers over to it. Windows 10 is far ahead of Linux in this regard.
- PaulDavisThe1st 6y agohey ralph, sorry for hijacking the comment thread! didn't plan to do that.
- raphlinus 6y agoNot at all, I thought it was a fascinating conversation. As you probably know, I worked on low-latency audio a bit as a "serious 20%" project while on Android, so I'm very interested in audio as well, and I think the two communities have lots to learn from each other.