Add SCX_LAVD scheduler#102
Open
Yury-MonZon wants to merge 1 commit into
Open
Conversation
Kernel (configs/minconfig-mainline):
- CONFIG_SCHED_CLASS_EXT=y (sched_ext)
- CONFIG_DEBUG_INFO_BTF=y, CONFIG_DEBUG_INFO_REDUCED off
(BTF is required by SCHED_CLASS_EXT and by the scx BPF programs)
- CONFIG_FTRACE_SYSCALLS=y (sys_enter_execve tracepoint used by scx_lavd)
Build environment:
- Add dwarves (pahole) to Dockerfile and README kernel deps; BTF
generation needs pahole >= 1.22 or olddefconfig silently drops it
- build-kernel-mainline.sh: fail fast if pahole is missing/too old,
instead of quietly shipping a BTF-less (sched_ext-less) kernel
Image (scx served from our apt repo):
- Enable scx.service via multi-user.target.wants overlay symlink
Benchmarks (RK3576, 8-core big.LITTLE, on battery, screen off,
scx_lavd v1.1.1 --autopower vs stock EEVDF):
Latency — schbench -m4 -t8 -r30 (wakeup latency):
p50 3532 us -> 26 us (135.85x faster)
p90 16112 us -> 3988 us (4.04x faster)
p99 31776 us -> 7976 us (3.98x faster)
p99.9 43200 us -> 18272 us (2.36x faster)
Throughput: -23% RPS under full saturation (latency/throughput trade).
Power — average watts at fixed load (long-settle fuel-gauge sampling):
idle 3.32 -> 3.50 W (+5%, scx housekeeping prevents deepest idle)
2c @ 25% 3.70 -> 3.56 W (-4%)
4c @ 50% 4.87 -> 4.06 W (-17%, core compaction at partial load)
8c @ 100% 6.02 -> 5.89 W (~tie)
Net: large interactivity/latency win; meaningful power savings across the
active partial-load range (peak ~17% at moderate load), small idle penalty.
NOTE: tests were run on a CPU without a heatsink. Sustained and high-load
figures (esp. 8c@100%) may be influenced by thermal throttling and should
be treated as indicative rather than absolute; the relative scheduler
comparison holds since both modes were tested under identical conditions.
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.
Kernel (configs/minconfig-mainline):
Build environment:
Image (scx served from our apt repo):
Benchmarks (RK3576, 8-core big.LITTLE, on battery, screen off, scx_lavd v1.1.1 --autopower vs stock EEVDF):
Latency — schbench -m4 -t8 -r30 (wakeup latency):
p50 3532 us -> 26 us (135.85x faster)
p90 16112 us -> 3988 us (4.04x faster)
p99 31776 us -> 7976 us (3.98x faster)
p99.9 43200 us -> 18272 us (2.36x faster)
Throughput: -23% RPS under full saturation (latency/throughput trade).
Power — average watts at fixed load (long-settle fuel-gauge sampling):
idle 3.32 -> 3.50 W (+5%, scx housekeeping prevents deepest idle)
2c @ 25% 3.70 -> 3.56 W (-4%)
4c @ 50% 4.87 -> 4.06 W (-17%, core compaction at partial load)
8c @ 100% 6.02 -> 5.89 W (~tie)
Net: large interactivity/latency win; meaningful power savings across the active partial-load range (peak ~17% at moderate load), small idle penalty.
NOTE: tests were run on a CPU without a heatsink. Sustained and high-load figures (esp. 8c@100%) may be influenced by thermal throttling and should be treated as indicative rather than absolute; the relative scheduler comparison holds since both modes were tested under identical conditions.
Downside: shows deprecation warnings on start, should be resolved in next version