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#6938 sched migrate: All options in microseconds + single scale #6980

Merged
merged 14 commits into from
Sep 17, 2024

Conversation

derekbruening
Copy link
Contributor

Refactors the scheduler's time-oriented options to become based on simulated microseconds rather than being unitless and having to all be separately scaled depending on the simulator's clock.

Deprecates these scheduler_options_t fields, replacing them with new versions:

  • quantum_duration => quantum_duration_{instructions,us}
  • block_time_scale => block_time_multiplier
  • block_time_max => block_time_max_us

Adds a new "time_units_per_us" which is the single place where a simulator sets the relationship between the value passed to "cur_time" in next_record() and simulated microseconds. The aforementioned fields are all compared to cur_time multiplied by time_units_per_us.

This is a prelude to adding yet more time-based options for the forthcoming scheduler additions with migration thresholds and rebalance periods.

Adds legacy support for binary compatibility. Recompiling will result in error messages prompting an update to the new fields.

Adds a unit test of legacy support.

Issue: #6938

Refactors the scheduler's time-oriented options to become based on
simulated microseconds rather than being unitless and having to all be
separately scaled depending on the simulator's clock.

Deprecates these scheduler_options_t fields, replacing them with new versions:
+ quantum_duration => quantum_duration_{instructions,us}
+ block_time_scale => block_time_multiplier
+ block_time_max => block_time_max_us

Adds a new "time_units_per_us" which is the single place where a
simulator sets the relationship between the value passed to "cur_time"
in next_record() and simulated microseconds.  The aforementioned
fields are all compared to cur_time multiplied by time_units_per_us.

This is a prelude to adding yet more time-based options for the
forthcoming scheduler additions with migration thresholds and
rebalance periods.

Adds legacy support for binary compatibility.  Recompiling will result
in error messages prompting an update to the new fields.

Adds a unit test of legacy support.

Issue: #6938
@derekbruening
Copy link
Contributor Author

a64 failure is drcachesim.simple-config-file bundle assert #3320

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.

Just a few clarification requests.

clients/drcachesim/common/options.cpp Outdated Show resolved Hide resolved
clients/drcachesim/scheduler/scheduler.h Outdated Show resolved Hide resolved
clients/drcachesim/scheduler/scheduler.h Show resolved Hide resolved
clients/drcachesim/scheduler/scheduler.h Outdated Show resolved Hide resolved
clients/drcachesim/tests/scheduler_unit_tests.cpp Outdated Show resolved Hide resolved
clients/drcachesim/tests/scheduler_unit_tests.cpp Outdated Show resolved Hide resolved
@derekbruening derekbruening merged commit 3cda8c8 into master Sep 17, 2024
17 checks passed
@derekbruening derekbruening deleted the i6938-time-units branch September 17, 2024 00:15
derekbruening added a commit that referenced this pull request Sep 26, 2024
Removes a duplicate option -sched_time_per_us which was accidentally
added by PR #6980 separately from the similar -sched_time_units_per_us
from PR #6985.

Issue: #6938
derekbruening added a commit that referenced this pull request Sep 27, 2024
Removes a duplicate option -sched_time_per_us which was accidentally
added by PR #6980 separately from the similar -sched_time_units_per_us
from PR #6985.

Issue: #6938
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.

2 participants