scx_layered: per-layer log2 runqueue-latency histogram (runnable -> running)#3706
Merged
Conversation
…unning) Add a per-layer histogram of scheduling wakeup latency, measured from when a task becomes runnable to when it first starts running. This gives per-layer runqueue-latency visibility straight off the stats socket, with no external tracer. The histogram has 26 log2-us buckets. Bucket 0 is [1us, 2us) with any sub-us latency folded in. Each subsequent bucket doubles, up to the saturating tail of >= 32s. The main use case here is to provide an external scheduling engine with a way of tracking wakeup latency per layer to potentially e.g. inform whether it needs to back off and send a container to a different node if a critical layer is experiencing elevated latencies. Signed-off-by: David Vernet <void@mainfault.com>
htejun
approved these changes
Jul 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a per-layer histogram of scheduling wakeup latency, measured from
when a task becomes runnable to when it first starts running. This gives
per-layer runqueue-latency visibility straight off the stats socket,
with no external tracer.
The histogram has 26 log2-us buckets. Bucket 0 is [1us, 2us) with any
sub-us latency folded in. Each subsequent bucket doubles, up to the
saturating tail of >= 32s. The main use case here is to provide an
external scheduling engine with a way of tracking wakeup latency per
layer to potentially e.g. inform whether it needs to back off and send a
container to a different node if a critical layer is experiencing
elevated latencies.