scx_lavd: fix an SCX_DSQ_LOCAL_ON runtime error in lavd_enqueue#3642
Open
likewhatevs wants to merge 3 commits into
Open
scx_lavd: fix an SCX_DSQ_LOCAL_ON runtime error in lavd_enqueue#3642likewhatevs wants to merge 3 commits into
likewhatevs wants to merge 3 commits into
Conversation
Add lavd_misplaced_local_on. Against unmodified scx_lavd it fails consistently with: SCX_DSQ_LOCAL[_ON] target CPU N not allowed for <task> scx_exit <- task_can_run_on_remote_rq <- dispatch_to_local_dsq Gated behind the ktstr-tests feature. Signed-off-by: Pat Somaru <patso@likewhatevs.io>
…avd_enqueue When the CPU picked in lavd_enqueue is invalid or not in the task's allowed mask, fall back to the task's current CPU. This takes lavd_misplaced_local_on from a consistent failure to a sporadic one: SCX_DSQ_LOCAL[_ON] target CPU N not allowed for <task> scx_exit <- task_can_run_on_remote_rq <- dispatch_to_local_dsq Signed-off-by: Pat Somaru <patso@likewhatevs.io>
… CPU After the off-mask fallback, lavd_misplaced_local_on still failed sporadically, as a runnable-task stall: runnable task stall (<task> failed to run for N s) Direct-dispatch SCX_DSQ_LOCAL_ON only when the picked CPU is the task's current CPU; otherwise enqueue to the domain DSQ. The test then passes. Signed-off-by: Pat Somaru <patso@likewhatevs.io>
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.
lavd_misplaced_local_on(a new ktstr test, gated behind thektstr-testsfeature) drives scx_lavd into a runtime error. Against unmodified scx_lavd it
fails consistently:
Two changes to
lavd_enqueue, described by their effect on that test:the task's allowed mask. This takes the test from a consistent failure to a
sporadic one (same error).
SCX_DSQ_LOCAL_ONonly when the picked CPU is the task'scurrent CPU; otherwise enqueue to the domain DSQ. The remaining sporadic
failure surfaced as a runnable-task stall (
runnable task stall (<task> failed to run for N s)); after this the test passes.The test is feature-gated, so a normal scx_lavd build is unaffected — the
harness is pulled in only with
--features ktstr-tests.Test plan
lavd_misplaced_local_onpasses with the fix (cargo ktstr test,--features ktstr-tests).