Repository navigation
feat(scheduler): separated EDF from common clustered scheduling logic - #813
Conversation
atsushi421
left a comment
There was a problem hiding this comment.
The # Implementing a clustered scheduler doc on the Scheduler trait in scheduler.rs and the last paragraph of the EDF section in mdbook/src/internal/scheduler.md still tell a new clustered scheduler to wrap its queue entries in ClusteredTask and to implement queued_cpu_mask() by hand. ClusteredScheduler<O> now does both, so consider pointing these texts to ClusteredOrdering instead. The PRIORITY_LIST prefix and is_clustered() requirement still applies.
scripts/ci.sh runs fmt, the target checks, clippy, udeps, and the host unit tests. None of these reach ClusteredScheduler::wake_task, get_next, or invoke_preemption. Please run test_edf and test_dag on QEMU and add the result to the description, because only those tests exercise the moved code.
a590ad4 to
842d12f
Compare
|
@atsushi421 I updated the docs and made sure the test applciations work as expected. I modified the description of the PR to include the log traces, as requested. |
842d12f to
926fa27
Compare
|
@atsushi421 I had to rebase and fix conflicts with |
Description
Separate how clustered tasks run from how EDF orders them.
clustered.rshandles CPU affinity, the ready queue, dispatch, and preemption.edf.rssupplies the ordering rule: the task with the earliest absolute deadline runs first among tasks eligible for the current CPU.The internal
ClusteredOrderingtrait identifies the scheduler throughKINDand supplies(absolute_deadline, ordering_time)once per wake:absolute_deadlineordering_timeMAX_TASK_PRIORITY - ordering_time, so earlier values rank higher.EDF returns
(deadline, deadline)because the real deadline also determines its ordering. The shared scheduler separately addswake_timeas the tie-breaker, so the actual EDF queue key remains(deadline, wake_time).Related links
None.
How was this PR tested?
scripts/ci.shpasses on my machine.test_edfonqemu-x86_64. The output logs are:test_dagonqemu-x86_64. The output logs are:Notes for reviewers
This is a behavior-preserving refactor. The two tuple elements are separate so a future scheduler can use a different ordering key without replacing the real deadline. This PR does not add Latest Finish scheduling or change DAG timing.