-
Notifications
You must be signed in to change notification settings - Fork 108
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_layered: Add waker stats per layer #671
Conversation
!(waker_tctx = lookup_task_ctx_may_fail(waker))) | ||
return; | ||
|
||
if (tctx->layer == waker_tctx->layer) |
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.
At some point we'll probably want to add some logic around here for interactivity boosting similar to scx_lavd.
b9cf62c
to
6fb2f0b
Compare
Update the task context to keep a mask of wakers and add stats for wakes across layers. Signed-off-by: Daniel Hodges <hodges.daniel.scott@gmail.com>
Signed-off-by: Daniel Hodges <hodges.daniel.scott@gmail.com>
if (tctx->layer == waker_tctx->layer) | ||
return; | ||
|
||
if ((pid_t)(tctx->waker_mask & waker->pid) == waker->pid) |
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.
I wonder whether this is a bit too fuzzy. Maybe just remember the last waker pid instead of keeping or'ing them?
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.
Yeah, that's probably good enough.
scheds/rust/scx_layered/src/stats.rs
Outdated
@@ -241,13 +247,15 @@ impl LayerStats { | |||
|
|||
writeln!( | |||
w, | |||
" {:<width$} open_idle={} mig={} xnuma_mig={} xllc_mig={} affn_viol={}", | |||
" {:<width$} open_idle={} mig={} xnuma_mig={} xllc_mig={} affn_viol={} xlayer_wake={} xlayer_rewake={}", |
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.
Let's break the line so that they end up more or less with similar column width.
Signed-off-by: Daniel Hodges <hodges.daniel.scott@gmail.com>
Refactored to use only last waker and the stats still seem reasonable:
|
Update the task context to keep a mask of wakers and add stats for wakes across layers.
Example output of layer stats: