sched: simplify xex() and expand cluster_sched test coverage#51
Open
zbelinsk wants to merge 3 commits into
Open
sched: simplify xex() and expand cluster_sched test coverage#51zbelinsk wants to merge 3 commits into
zbelinsk wants to merge 3 commits into
Conversation
3ebb636 to
9e1c89a
Compare
Replace xex()'s branch-heavy switch with a branchless arithmetic equivalent: HVX(xe) and HLX(xe3) share one coproc slot, so their contribution to coproc_count is (new_xe|new_xe3) - (cur_xe|cur_xe3); HMX(xe2) is its own slot using plain subtraction. Verified equivalent by truth table. Comparing compiled result- 5 insns / 0 branches vs 15 / 3. Expand the readylist CLUSTER_SCHED test to cover all code paths in H2K_ready_head. Add slot-accounting correctness checks verifying xe, xe|xe3, and xe|xe3|xe2 each charge the expected count delta. Signed-off-by: Zeev Belinsky <zbelinsk@qti.qualcomm.com>
Signed-off-by: zbelinsk <zbelinsk@qti.qualcomm.com>
Signed-off-by: Zeev Belinsky <zbelinsk@qti.qualcomm.com>
ed69362 to
818db5d
Compare
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.
Replace xex()'s branch-heavy switch with a branchless arithmetic equivalent: HVX(xe) and HLX(xe3) share one coproc slot, so their contribution to coproc_count is (new_xe|new_xe3) - (cur_xe|cur_xe3); HMX(xe2) is its own slot using plain subtraction. Verified equivalent by truth table and by comparing compiled result- 5 insns / 0 branches vs 15 / 3.
Expand the readylist CLUSTER_SCHED test to cover all five code paths in H2K_ready_head: early-out, fits
locally, full+no-waiters oversubscribe, full+handoff, and ring-walk-exhausted/ring-walk-finds-fitter. Add slot- accounting correctness checks verifying xe, xe|xe3, and xe|xe3|xe2 each charge the expected count delta.