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_rustland: small updates #77

Merged
merged 3 commits into from
Jan 9, 2024
Merged

scx_rustland: small updates #77

merged 3 commits into from
Jan 9, 2024

Conversation

arighi
Copy link
Collaborator

@arighi arighi commented Jan 9, 2024

Small updates to rustland after the API change:

  • get rid of force_local and dispatch in select_cpu() when possible
  • improved the dynamic time slice logic (especially in large multi-core system)
  • added a link to my live demo YouTube video in README.md

Update the README.md adding a link to a live demo video of the
scheduler.

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Now that we can dispatch directly from select_cpu() we can make the code
more compact and readable by removing the force_local logic.

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Move scaling after tasks are sent to the dispatcher: tasks are
dispatched based on the amount of idle CPUs, so checking for any
remaining tasks still sitting in the scheduler after dispatch gives a
better idea how busy the system is.

Moreover, do not scale the time slice based on nr_cpus (otherwise,
systems with a large amount of CPUs would rarely get any scaling at
all).

Instead, apply a scaling factor as a function of how many tasks are
still waiting in the scheduler: nr_scheduled / 2. This method scales
better as the number of CPUs increases.

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
@arighi arighi merged commit 9e782b9 into main Jan 9, 2024
0 of 2 checks passed
@htejun htejun deleted the scx-rustland-update branch January 10, 2024 19:51
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