3 ms·
> There are good reasons videogame engines tend to use spinlocks Care to elaborate upon this statement? > "Linux pessimizes for high-performance games atop it
by falcolas 7y ago
> There are good reasons videogame engines tend to use spinlocks
Care to elaborate upon this statement?
> "Linux pessimizes for high-performance games atop its kernel."
Games can run at quite a high performance (which feels like a really odd statement) atop the general purpose Linux kernel. Even with the windows-specific APIs being emulated with Wine/Proton.
There are many modern games, including Doom 2016 as I mentioned below) which run beautifully on Linux.
- shadowgovt 7y ago> Care to elaborate upon this statement? I wouldn't redo the work of people who have literally written books on the topic (https://books.google.com/books?id=1g1mDwAAQBAJ&pg=PA319&lpg=PA319#v=onepage&q&f=false https://books.google.com/books?id=1g1mDwAAQBAJ&pg=PA319&lpg=...). Copyright 2019, so if it's not conventional wisdom that spinlocks are the right tool any longer, the "best practices" in game education are still teaching them, and OS's may need to account for the code actually written, not the code they wish were written.
- danShumway 7y ago> OS's may need to account for the code actually written, not the code they wish were written. I don't think this should be asserted in such a black-and-white way. Yes, platforms need to accommodate the programming styles of users. But accommodating them blindly, when better solutions exist, is how you get bad APIs that age poorly. In platforms that are aiming for long-term stable APIs, it may make more sense in some cases to prioritize the cleanliness of the API over developer patterns, given that developer patterns are easier to change.
- catalogia 7y agoIf gamedev books are teaching specific quirks of the Windows scheduler, those books should be updated, rather than making linux emulate those quirks of Windows. Anticipated response: > "but that won't happen and gaming on linux will be too niche and will die." To be quite frank, that sounds like a satisfactory outcome to me. If Google wants a different status quo, they should throw more money at the problem rather than telling game developers to moan about it. You don't hear game developers moaning about this sort of shit when porting their games to the FreeBSD-backed PS4, presumably because Sony, unlike Google, actually gave a damn and made sure the platform worked and made sure developers knew how it works. If the requisite work has already been done on FreeBSD, then maybe Google should have decided to use that instead. Either way, it's on them. They made this mess for themselves.
- shadowgovt 7y agoDefinitely. It's not out of the realm of possibility (especially for Google) that the easiest solution to ease the woes of Stadia developers is to fork Linux and switch out the scheduler algorithm for their special-purpose application. Only downside to that solution is games ported to run on Stadia wouldn't be expected to perform particularly well on other Linux architectures.
- falcolas 7y agoThanks for the link. > OS's may need to account for the code actually written I absolutely disagree with this idea, particularly as it's related to spinlocks. Spinlocks are such a low level, inefficient, method of acquiring a lock that using them as a de-facto method of acquiring a lock is a terrible idea. Especially as more and more gaming occurs on devices with batteries. Any moderately sane OS will treat the resulting device heat increase and increased battery draw as a trigger to degrade CPU performance, hurting the game performance even more than using a sane lock acquisition method.
- belltaco 7y agoWINE/Proton are not emulators.
- foresto 7y agoWine's purpose is literally to emulate the Windows runtime environment. Extrapolate.
- shadowgovt 7y agoSo is the expansion of the project name to "Wine Is Not an Emulator" intended as a joke?
- falcolas 7y agoIt's an aping of GNU is not unix and such. So, yeah. That's a fair statement.