-
Notifications
You must be signed in to change notification settings - Fork 173
scx_lavd: Use Peek operation in lavd if available #2675
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
base: main
Are you sure you want to change the base?
Conversation
@daidavid - I'll post some more baremetal perf results here. Under a VM with 50 cpus, 1 cpudom, 120 GB ram, it really doesn't move schbench score. |
@rrnewton Yes, let's get the numbers with baremetal. VM numbers are noisy and not very meaningful, a few things to keep in mind:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, Ryan! I left a few comments for the next version.
One nitpicking is to use "scx_lavd" instead of "[SCX][LAVD]" as a prefix of the commit message for consistency.
Summary: The per-cpu queues mode in LAVD checks multiple queues for potential steal targets. These checks can be made more efficient with the forthcoming O(1) lockless peek operation. This patch updates LAVD to use peek in three places: - try_to_steal: picking cpu with lowest vtime - on consume_task: checking the cpu DSQ - on consume_task: checking the domain DSQ Note that these usages are necessarily racy because no lock is held. That is, we could peek a low vtime, but the task may have moved or completed by the time we attempt to steal it. Test Plan: - ran schbench under a VM [1 cpdom, 50cpus] Reviewers: daidavid
Summary: This function was replaced with `pick_cpu_with_lowest_vtime`. Unless there is some other context we plan to use it in, let's get rid of it.
@multics69 - ok, comments resolved. Let me know if that looks good now. |
Thanks for addressing the comments. It looks good now. Let's merge it to the main once the kernel patch is submitted. |
See commit description for the first diff, copied below.
[SCX][lavd] modify lavd to use new peek operation
Summary:
The per-cpu queues mode in LAVD checks multiple queues for potential steal targets.
These checks can be made more efficient with the forthcoming O(1) lockless peek operation.
This patch updates LAVD to use peek in three places:
Note that these usages are necessarily racy because no lock is held. That is, we
could peek a low vtime, but the task may have moved or completed by the time we
attempt to steal it.
Test Plan:
Reviewers: daidavid