-
Notifications
You must be signed in to change notification settings - Fork 157
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 a bug that starves all children except an unblocked child in weight_fair TC #729
Conversation
In Stride Scheduler implementation, pass should advance to the "global pass", rather than go back to zero.
Google C++ guide states that struct members should be named "member", not "member_", unlike class members.
There is a bug that frequently blocked/unblocked children are (unfairly) more often scheduled than other children
Codecov Report
@@ Coverage Diff @@
## master #729 +/- ##
==========================================
+ Coverage 70.92% 70.99% +0.07%
==========================================
Files 220 220
Lines 14133 14103 -30
==========================================
- Hits 10024 10013 -11
+ Misses 4109 4090 -19
Continue to review full report at Codecov.
|
return false; | ||
} | ||
|
||
child->parent_ = this; | ||
WeightedFairTrafficClass::ChildData child_data{STRIDE1 / share, pass, child}; | ||
ChildData child_data{STRIDE1 / share, {NextPass()}, child}; |
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.
Since this is initializing a struct with a union, for clarity would you be able to use designated initializers?
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.
Yeah, I wanted to do that, but g++5 refused with "non-trivial designated initializers are not supported" 😞
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.
Hrm... I was hoping that that wouldn't happen with unions because it'd be smart enough to know that one option among the union is set.
In the current implementation of stride scheduling for weighted fair sharing, the "pass" value of unblocked (joined again) child TCs are initialized to 0. Then only that TC will be scheduled until its pass value has caught up with the that of other TCs. This caused scheduling bug reported in #717.
In addition, a minor bug, where frequently blocked TCs are more scheduled than they should be, has also been fixed (
client->remain
in Fig 3 in the original paper)