Skip to content

sched: simplify xex() and expand cluster_sched test coverage#51

Open
zbelinsk wants to merge 3 commits into
masterfrom
cluster_sched_testing
Open

sched: simplify xex() and expand cluster_sched test coverage#51
zbelinsk wants to merge 3 commits into
masterfrom
cluster_sched_testing

Conversation

@zbelinsk

Copy link
Copy Markdown
Contributor

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.

@zbelinsk zbelinsk force-pushed the cluster_sched_testing branch from 3ebb636 to 9e1c89a Compare June 13, 2026 23:17
zbelinsk added 3 commits June 13, 2026 18:27
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>
@zbelinsk zbelinsk force-pushed the cluster_sched_testing branch from ed69362 to 818db5d Compare June 14, 2026 01:31
@zbelinsk zbelinsk requested a review from bryanb-h2 June 14, 2026 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant