-
-
Notifications
You must be signed in to change notification settings - Fork 430
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
Improve spinlock implementation to perform better in high-contention situations #4557
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thanks! The comments are mostly subjective style issues. Feel free to do as you please with them.
- flyby: make sure yield_while(pred, "", false) actually doesn't suspend
Uhh, not good. I wouldn't think that this particular change is causing this. So I guess the only thing we can do is to bisect... |
I did another build this morning, but this time I turned off everything that might cause overheads
The build seems to perform much more in line with expectations - and looks a little better than december Please disregard my previous graph as there must have been something enabled that shouldn't have been. |
@biddisco thanks! This looks more like what I would have expected. Brilliant! |
This reduces the cache-pressure while acquiring highly contented spinlock instances by mostly reading from it instead of constantly trying to write to it.
As a flyby, this removes the dependency on
boost/smart_ptr/detail/spinlock.hpp
and related Boost facilities.