Skip to content
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

Merged
merged 3 commits into from
Nov 29, 2017

Conversation

sangjinhan
Copy link
Member

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)

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
Copy link

codecov bot commented Nov 16, 2017

Codecov Report

Merging #729 into master will increase coverage by 0.07%.
The diff coverage is 91.3%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
core/traffic_class.h 89.86% <100%> (+0.28%) ⬆️
core/traffic_class_test.cc 99.4% <100%> (ø) ⬆️
core/traffic_class.cc 91.03% <87.5%> (+0.21%) ⬆️
core/modules/source.cc 75.67% <0%> (-0.65%) ⬇️
core/utils/simd.h 100% <0%> (ø) ⬆️
core/utils/checksum.h 95.86% <0%> (+2.29%) ⬆️
core/utils/copy.h 76.92% <0%> (+13.19%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a9991cf...963a21d. Read the comment docs.

return false;
}

child->parent_ = this;
WeightedFairTrafficClass::ChildData child_data{STRIDE1 / share, pass, child};
ChildData child_data{STRIDE1 / share, {NextPass()}, child};
Copy link
Contributor

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?

Copy link
Member Author

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" 😞

Copy link
Contributor

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.

@melvinw melvinw merged commit f31028e into master Nov 29, 2017
@melvinw
Copy link
Contributor

melvinw commented Nov 29, 2017

Thanks!

cat

@melvinw melvinw deleted the improve_wf_accuracy branch November 29, 2017 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants