i#6471 sched idle: Add idle time from blocking syscalls #6494
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.
Adds a longer waiting period on blocking syscalls using either provided output time or for instruction-based quanta a count of queue selections before a blocked input is actually selected. Since the scheduler does not have timer interrupts or regular points of control and relies on its user calling it, idle inputs are kept on the ready queue and are checked for becoming unblocked when the ready queue is queried.
The wait duration is set based on the "wait time factor" which is the syscall latency divided by the context switch threshold multipled by a user-provided "block_time_scale" option which can be used to scale up or down the durations.
The wait duration is erased on a direct switch to an input.
Adds a new replay record type to represent idle time on replay.
Augments the unit tests to include blocking high-latency syscalls to test the new feature in various sub-tests.
Issue: #6471