Google Stadia Port Troubles Blamed on the Linux Kernel Scheduler

(Image credit: Shutterstock)
Latest Videos FromTom's Hardware
Nathaniel Mott
Freelance News & Features Writer

Nathaniel Mott is a freelance news and features writer for Tom's Hardware US, covering breaking news, security, and the silliest aspects of the tech industry.

  • mitch074
    ...and it was debunked by Linus Torvalds himself here : https://www.realworldtech.com/forum/?threadid=189711&curpostid=189723and 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.
    Reply
  • bit_user
    mitch074 said:
    ...and it was debunked by Linus Torvalds himself
    That may be, but...

    mitch074 said:
    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.

    mitch074 said:
    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.
    Reply