fix: Charge pipe I/O cycles before scheduler-side copies#5240
Closed
Officeyutong wants to merge 1 commit into
Closed
fix: Charge pipe I/O cycles before scheduler-side copies#5240Officeyutong wants to merge 1 commit into
Officeyutong wants to merge 1 commit into
Conversation
Contributor
|
This change affects the script's cycles statistics, which may cause network forks. |
XuJiandong
reviewed
Jun 17, 2026
XuJiandong
left a comment
Contributor
There was a problem hiding this comment.
The cycles are part of consensus
Collaborator
Author
So it's better now to make these changes? |
Contributor
|
It can be changed in next hard fork. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What problem does this PR solve?
Issue Number: close #xxx
Problem Summary:
Pipe read/write transferred-byte cycles were added to the participating VM-local cycle counters during
process_io(). If a writer stayed blocked inWaitForWriteand the root VM terminated before that writer became runnable again, those pending VM-local cycles could be discarded when non-root VMs were purged.The host-side pipe copy also happened before the scheduler consumed and enforced the transfer cycles for the current iteration, so large pipe transfers could perform memory-copy work before the remaining cycle budget reflected that cost.
What is changed and how it works?
Proposal: xxx
What's Changed:
Charge pipe transfer cycles directly to the scheduler iteration counter in
process_io()before performing the memory copy.process_io()now receives the current remaining cycle limit and returnsCyclesExceededif the transfer would exceed that budget.The scheduler then consumes the updated
iteration_cyclesin the sameiterate_outer()iteration, so pipe I/O cycles cannot be lost when a blocked VM is later purged. The existing exact-cycle spawn test was updated for the corrected accounting timing.Related changes
owner/repo:Check List
Tests
Side effects