-
Notifications
You must be signed in to change notification settings - Fork 316
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
feat: EXC-1735: Move scheduling into the inner round #1757
base: master
Are you sure you want to change the base?
Conversation
0a2a8f3
to
f0ea8a7
Compare
By moving the scheduling strategy into the inner round, we can adjust canister priorities within each round. This allows for greater flexibility and responsiveness to change canister priorities.
f0ea8a7
to
d4cd725
Compare
// Scheduling. | ||
// TODO(EXC-1617): The scheduling will be optimized in the follow up PRs. | ||
let (mut active_canisters_partitioned_by_cores, inactive_canisters) = { | ||
let _timer = self.metrics.round_scheduling_duration.start_timer(); |
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.
Potentially the name of the metric needs adjustment, i.e. inner_round_*
might be more appropriate. Given that changing names can break dashboards, we can defer it to another PR.
// Decrease accumulated priorities of the top `scheduler_cores` canisters. | ||
// This is required to respect scheduler invariant after the round is finished. | ||
canister_state.scheduler_state.accumulated_priority -= |
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.
I'm not sure I follow how this is now equivalent to the code before. Can you maybe explain this part a bit?
assert_eq!(canister.system_state.canister_metrics.executed, 2); | ||
assert!(!canister.has_paused_execution()); | ||
|
||
// The accumulated priority should not increase after the long execution is finished. |
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.
Is this a change in behaviour compared to current state?
By moving the scheduling strategy into the inner round, we can adjust canister priorities within each round. This allows for greater flexibility and responsiveness to change canister priorities.