Thanks! Some context here. It started here: https://probablydance.com/2019/12/30/measuring-mutexes-spinlocks-and-how-bad-the-linux-scheduler-really-is/ … and there was a Linus response here: https://www.realworldtech.com/forum/?threadid=189711&curpostid=189723 …
-
-
This Tweet is unavailable.
-
This Tweet is unavailable.
-
This Tweet is unavailable.
-
Replying to @Jonathan_Blow @aarroyoca
Everything Linus said was exactly what I thought when I read the blog post. But maybe we are both wrong. I could try to elaborate but probably not on Twitter? Either way, anyone who claims to be timing a kernel scheduler using C++ without ever showing the ASM is a bit suspect.
0 replies 0 retweets 4 likes -
This Tweet is unavailable.
-
Replying to @Jonathan_Blow @aarroyoca
Because if you go back and read the blog post in detail (which is kind of a waste of time, but if you are bored), the guy wrote literally a loop that does nothing but take clock samples and locks. In that scenario, it is _very likely_ the OS will swap you out in between!
1 reply 0 retweets 2 likes -
Because you have ensured that the _common case_ is the exact scenario that will cause weird things like getting swapped out in between a clock sample and a exchange, even though that is _never_ the common case in a well-written multithreaded program.
1 reply 0 retweets 2 likes -
In order to time a scheduler, you have to have your threads _actually do something_, otherwise you are timing something that you should have designed your program to avoid, which is 100% of your threads contending the lock 100% of the time. Who cares what a scheduler does then?
1 reply 2 retweets 17 likes -
This Tweet is unavailable.
Later in the thread, the person who posted the blog entry responds to Linus, and seems to still not understand what he's doing, and Linus provides an even longer explanation of all the problems with what the blog post did: https://www.realworldtech.com/forum/?threadid=189711&curpostid=189752 …
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.