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

scx_lavd: directly accumulate task's runtimes for consecutive runnings #204

Merged
merged 6 commits into from
Mar 31, 2024

Conversation

multics69
Copy link
Contributor

Drop slice_boost_prio's multiplying runtime of task's consecutive runnings. Instead of such approximation, let's directly measure the accumulated run time of consecutive runnings in a runnable<-->quiescent transition. The calculation of run_freq has been updated according to this change. In addition, the upper bound of ineligible duration (LAVD_ELIGIBLE_TIME_MAX) increases to better reflect the actual distribution of tasks' ineligible duration. Finally, the rest commits improves the code for better readability.

Changwoo Min added 6 commits March 29, 2024 14:49
Let's change the function names of update_stat_for_*() as follow their
callers for consistency and less confusion.

Signed-off-by: Changwoo Min <changwoo@igalia.com>
Remove runtime_boost using slice_boost_prio. Without slice_boost_prio,
the scheduler collects the exact time slice.

Signed-off-by: Changwoo Min <changwoo@igalia.com>
When a task runs more than once (running <->stopping) within one
runnable-quiescent transition, accumulate runtime of multiple runnings
for statistics. This helps to get the task's runtime per schedule when
supposing that a huge time slice is given, which is what we want to
collect for scheduling decisions.

Signed-off-by: Changwoo Min <changwoo@igalia.com>
Change the last_{start/stop/wait/wake}_clk in task_ctx to
last_{running/stopping/quiescent/runnable}_clk, matching with state
transition names. In addition, add comments and reorder fields in
task_ctx for readability.

Signed-off-by: Changwoo Min <changwoo@igalia.com>
Change the calculation of the run_frequence using the wait_period from
the last time the task yielded CPU to this time when the task is
running. The old implementation measures the time interval between the
last stopping and the current running and increases run_freq without
reason.

Signed-off-by: Changwoo Min <changwoo@igalia.com>
Change the upper bound of ineligible duration (LAVD_ELIGIBLE_TIME_MAX).
The updated (2x increased) upper bound reflects the distribution of
tasks' eligible_delta_ns better.

Signed-off-by: Changwoo Min <changwoo@igalia.com>
@multics69 multics69 requested a review from htejun March 30, 2024 14:21
@multics69 multics69 merged commit 048662a into sched-ext:main Mar 31, 2024
1 check passed
@multics69
Copy link
Contributor Author

Thank you @htejun for the revirew!

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.

None yet

2 participants