Bump waker refcount from i16 to i32 #692
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In high performance systems there may be a significant number of concurrent futures all sleeping and 32768 is quite a low limit. 2 billion is a bit more reasonable and significantly less likely to be hit in practice.
What does this PR do?
Glommio can support more than 32768 concurrent futures.
Motivation
I observed that I can end up with this many futures in the task queue in certain high performance scenarios and in general it's super easy to bump into when it's hard to coalesce multiple futures behind a single waker.
Related issues
Additional Notes
The unit test isn't realistic in terms of what I've observed triggers this but I don't know right now how to write a more realistic version that triggers when the refcount is i16.
Checklist
[X] I have added unit tests to the code I am submitting
[X] My unit tests cover both failure and success scenarios
[] If applicable, I have discussed my architecture