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

i#6977: Fix quantum underflow #6973

Merged
merged 3 commits into from
Sep 11, 2024
Merged

i#6977: Fix quantum underflow #6973

merged 3 commits into from
Sep 11, 2024

Conversation

derekbruening
Copy link
Contributor

@derekbruening derekbruening commented Sep 9, 2024

Fix bug underflowing quantum time when trying to correct overshoot but the quantum just expired and so is 0; or, we're replaying. Adds an assert.

A test will come in the forthcoming rebalance test for per-output runqueues, which is where this bug was discovered.

Fixes #6977

Fix bug underflowing quantum time when trying to correct overshoot but
the quantum just expired and so is 0; or, we're replaying.
Adds an assert.

A test will come in the forthcoming rebalance test for per-output
runqueues, which is where this bug was discovered.

Issue: #6938
@derekbruening
Copy link
Contributor Author

Maybe it is worth filing a separate issue and updating the description to point at it instead of the migrate issue? Ended up finding and fixing these as part of the runqueues and now trying to split out unrelated pieces with minimal effort...it is probably possible to make a smaller separate dedicated test to trigger this instead of only relying on the new larger rebalance test; tradeoffs.

Copy link
Contributor

@brettcoon brettcoon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given the complexity of this code and the number of bugs found recently, it certainly seem like more tests would be beneficial. But I don't have a good feel for whether or not it's worth adding a small directed test for this particular problem, assuming a bigger test that's already written will reliably cover it.

clients/drcachesim/scheduler/scheduler.cpp Outdated Show resolved Hide resolved
@derekbruening derekbruening changed the title i#6938 sched migrate: Fix quantum underflow i#6977: Fix quantum underflow Sep 10, 2024
@derekbruening
Copy link
Contributor Author

Ended up filing an issue to cover this: #6977

@derekbruening
Copy link
Contributor Author

derekbruening commented Sep 10, 2024

a64 failure is TLB-threads bundle #3320

@derekbruening derekbruening merged commit f28e7ed into master Sep 11, 2024
16 of 17 checks passed
@derekbruening derekbruening deleted the i6938-quantum-underflow branch September 11, 2024 00:28
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.

scheduler time in quantum underflows, leading to negative values
2 participants