-
Notifications
You must be signed in to change notification settings - Fork 566
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
i#6471 idle: Add better idle time modeling
Changes instruction quantum idle handling to use wall-clock time, instead of a counter decremented in queue pops. The counter was skewed unfairly by the rate of queue queries. This results in all quanta using a unified time-based approach for blocked time. Changes block_time_scale to remove the division by the latency threshold. Now the scale is directly multiplied by the latency to result in the blocked time units. The default scale is set to 1000 which matches the wall-clock time to process an instruction by the schedule_stats tool (about 1 instruction per microsecond) and which should be a rough match for many simulators passing one nanosecond cycle per instruction as the time unit. Adds a new scheduler option block_time_max and scheduler option -sched_block_max which caps the blocked time for a syscall (default 25 seconds) to avoid outliers being scaled to extreme amounts of time. Adds a heartbeat of queue lookups, currently only in debug build, to help understand behavior over time. Sets the input ordinal to invalid while idle. This also causes schedule_stats to consider a transition from idle to a valid input to be a context switch, which matches how the Linux kernel counts switches. Augments schedule_stats with a wall-clock measure of cpu and idle time for a much fairer %cpu metric than the previous one based purely on record counts, as schedule_stats processes an instruction much more quickly than an idle record. Adds two %cpu metrics: one that does not include idle time past the final instruction (for skewed finishes across cores) and one that includes idle time until all cpus are done. Increases the default -schedule_stats_print_every to 500K to avoid extremely long strings for larger workloads. Updates the scheduler unit tests for the timing changes, changing the ones testing idle time to use a deterministic mock time quantum to avoid wall-clock time flakiness. Tested on large traces on dozens of cores with known idle characteristics where by tweaking the parameters I was able to get reasonably representative idle times. Issue: #6471
- Loading branch information
1 parent
c40095e
commit e6507a1
Showing
10 changed files
with
313 additions
and
135 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.