News Google Stadia Port Troubles Blamed on the Linux Kernel Scheduler

...and it was debunked by Linus Torvalds himself here : https://www.realworldtech.com/forum/?threadid=189711&curpostid=189723
and here: https://www.realworldtech.com/forum/?threadid=189711&curpostid=189752
He describes the way the time measurement is plain wrong for one, and second that using spinlocks in user space is in 99% of cases a bad idea.
The original developer's rant simply amounts to "using spinlocks on Windows works as I want it, but not on Linux". From what can be found, it would seem that this is a bug, not a feature, of the Windows kernel.
 

bit_user

Polypheme
Ambassador
...and it was debunked by Linus Torvalds himself
That may be, but...

and second that using spinlocks in user space is in 99% of cases a bad idea.
Seems consistent with what the original author concluded, which is sound advice. I never use spinlocks.

So what should we do based on the above? I hope to have convinced you to avoid spinlocks, even for very short sections.

The original developer's rant simply amounts to "using spinlocks on Windows works as I want it, but not on Linux". From what can be found, it would seem that this is a bug, not a feature, of the Windows kernel.
Um, not really. He was debugging a real problem, which was stuttering that he didn't see on Windows. Even if his measurement methodology was flawed, I think he still reached the best conclusion, and had some interesting observations about different Linux schedulers that he tried (not the timing data, which Torvalds debunked, but the more casual observations) and about realtime thread scheduling (in short: don't).

Edit: I do think it's pretty sad to see how much time that developer spent, trying to optimize a fundamentally bad approach. However, that ultimately serves to reinforce his conclusion & Torvalds' message. Had his analysis not been so involved, I doubt this would've gotten quite so much attention.
 
Last edited: