-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix compilation of springtime tests and upgrade catch2 #436
fix compilation of springtime tests and upgrade catch2 #436
Conversation
3b7094f
to
d84b37b
Compare
Summoning @marcushutchings for review |
Maybe I'm missing or overlooking something, but the current logic seems to check out. The initial avg latency being set to 0 seems fine - it can change over time. It seems to me that the original intent of the code was to measure the average inaccuracy of the OS sleep function when it overshoots. Then by measuring that, because it differs between hardware, OSes, and circumstances, if a request comes in that is smaller than the average overshot, then it will use a more accurate, but potentially more performance intensive, thread yield() function. As the OP has mentioned, we don't have any sleep requests small enough to trigger this; though, I'm not sure why the current code is considered dead. |
Apologies for sounding dumb: I'm curious about the the change to rts/lib/catch.hpp. What was the driving factor that needed this update? GitHub is failing to show the diffs for it. |
Thank you Marcus. Your comment made me aware that I misread what was being stored in avgThreadSleepTimeMicroSecs. |
I will fix compilation of tests in separate PR |
I forgot to mention that I think the use of |
7d55cea
to
075e577
Compare
@dzosz Is there anything you still want to work on this PR? |
* update catch2 to 2.13.5 to resolve issue with MINSIGSTKSZ being no longer usable in constexpr context * catchorg/Catch2#2421
…ument is nanosec or millisec type
…t durations * before yielding logic was depending on previous durations of sleep function. now it depends only on previous yield durations * initial yield boundary set to 100 us. gets smoothed to actual values with consequent calls
…for short durations" This reverts commit d84b37bb229b83192ba9a2ee2918d7e926262531.
…tion argument is nanosec or millisec type" This reverts commit 4cd9994af3cc58b054a36697adbca68062cd9d45.
d84b37b
to
e537913
Compare
issue with compiling catch is described here catchorg/Catch2#2421 I was testing the hypothesis that yielding the thread when timer is not precise enough can cause even more performance issues (imprecise timers might be the cause of high cpu workload) but I was unable to come to any conclusions on my modern hardware (I was using taskset to run spring on two threads). I've got an older laptop so I'll test it there but for now |
@marcushutchings would you mind taking another look? |
Sorry for the delay, sure I'll take another look. |
since I reverted all functional changes i'll spare you the time. I'm commiting only fixes for test files in cmakelists |
ce16f9a
to
750ec36
Compare
Enables thread yielding instead of sleep for micro durations that OS probably won't schedule on time. Not sure if this change is welcome as it changes default behavior.
State before:
State after: