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

feat: EXC-1735: Move scheduling into the inner round #1757

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

berestovskyy
Copy link
Contributor

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.

@github-actions github-actions bot added the feat label Sep 30, 2024
@berestovskyy berestovskyy force-pushed the andriy/exc-1735-shedule-inner-round branch 2 times, most recently from 0a2a8f3 to f0ea8a7 Compare September 30, 2024 20:22
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.
@berestovskyy berestovskyy force-pushed the andriy/exc-1735-shedule-inner-round branch from f0ea8a7 to d4cd725 Compare September 30, 2024 20:24
@berestovskyy berestovskyy changed the title feat: EXC-1735: Move scheduling strategy into the inner round feat: EXC-1735: Move scheduling into the inner round Sep 30, 2024
@berestovskyy berestovskyy marked this pull request as ready for review October 1, 2024 07:08
@berestovskyy berestovskyy requested a review from a team as a code owner October 1, 2024 07:08
// 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();
Copy link
Member

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.

Comment on lines +370 to +372
// 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 -=
Copy link
Member

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

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants