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_p2dq Add scaled vtime to accounting #1568

Merged
merged 1 commit into from
Mar 27, 2025

Conversation

hodgesds
Copy link
Contributor

When weighted tasks are run use scaled vtime to appropriately account the vtime on the LLC/DSQ of the task.

@JakeHillion and I noticed some issues with vtime handling going through the code. There's still probably more to cleanup, but this is an easy fix.

Performance remains good with stress-ng tests:

sudo ./target/release/scx_p2dq --stats 1 -s 1000 -x 1:

$ stress-ng -c 60 -t 15 -M
stress-ng: info:  [394158] setting to a 15 secs run per stressor
stress-ng: info:  [394158] dispatching hogs: 60 cpu
stress-ng: metrc: [394158] stressor       bogo ops real time  usr time  sys time   bogo ops/s     bogo ops/s CPU used per       RSS Max
stress-ng: metrc: [394158]                           (secs)    (secs)    (secs)   (real time) (usr+sys time) instance (%)          (KB)
stress-ng: metrc: [394158] cpu              872017     15.00    893.49      0.10     58127.58         975.86        99.28          5248
stress-ng: info:  [394158] skipped: 0
stress-ng: info:  [394158] passed: 60: cpu (60)
stress-ng: info:  [394158] failed: 0
stress-ng: info:  [394158] metrics untrustworthy: 0
stress-ng: info:  [394158] successful run completed in 15.02 secs

eevdf:

$ stress-ng -c 60 -t 15 -M
stress-ng: info:  [390654] setting to a 15 secs run per stressor
stress-ng: info:  [390654] dispatching hogs: 60 cpu
stress-ng: metrc: [390654] stressor       bogo ops real time  usr time  sys time   bogo ops/s     bogo ops/s CPU used per       RSS Max
stress-ng: metrc: [390654]                           (secs)    (secs)    (secs)   (real time) (usr+sys time) instance (%)          (KB)
stress-ng: metrc: [390654] cpu              871792     15.00    894.13      0.15     58110.48         974.86        99.35          5268
stress-ng: info:  [390654] skipped: 0
stress-ng: info:  [390654] passed: 60: cpu (60)
stress-ng: info:  [390654] failed: 0
stress-ng: info:  [390654] metrics untrustworthy: 0
stress-ng: info:  [390654] successful run completed in 15.01 secs

When weighted tasks are run use scaled vtime to appropriately account
the vtime on the LLC/DSQ of the task.

Signed-off-by: Daniel Hodges <[email protected]>
Copy link
Contributor

@etsal etsal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense and is consistent with other schedulers.

@hodgesds hodgesds added this pull request to the merge queue Mar 27, 2025
Merged via the queue into sched-ext:main with commit 6f333ef Mar 27, 2025
28 checks passed
@hodgesds hodgesds deleted the p2dq-vtime-fixes branch March 27, 2025 22:18
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.

2 participants