Skip to content

refactor(sched): drop the clustered scheduler abstraction - #790

Closed
atsushi421 wants to merge 1 commit into
mainfrom
refactor/edf-drop-clustered-abstraction
Closed

atsushi421 wants to merge 1 commit into
mainfrom
refactor/edf-drop-clustered-abstraction

Conversation

@atsushi421

@atsushi421 atsushi421 commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Description

This PR removes the clustered scheduler abstraction. It does not change the behavior.

After #787, the EDF scheduler is the only scheduler whose tasks carry a CPU set. The clustered abstraction generalized over a family with one member, and its names called global EDF tasks "clustered".

Changes:

  • get_next_task() calls edf::SCHEDULER directly and then tries PRIORITY_LIST[1..]. A compile-time assertion checks that the EDF scheduler is first in PRIORITY_LIST. This replaces SchedulerType::is_clustered(), get_num_clustered_schedulers(), and the prefix assertion.
  • Scheduler::queued_cpu_mask() becomes an inherent method of EDFScheduler, and wake_workers() calls it directly. This removes clustered_queued_cpu_mask() and the "Implementing a clustered scheduler" section of the trait doc.
  • ClusteredTask moves into scheduler/edf.rs as the private QueuedTask, and NUM_CLUSTERED_TASKS_IN_QUEUE becomes NUM_EDF_TASKS_IN_QUEUE.
  • scheduler::edf becomes pub(super), like scheduler::panicked, so that wake_workers() in task.rs can call edf::SCHEDULER.queued_cpu_mask().
  • Comments and the mdbook use EDF terms.

Related links

How was this PR tested?

  • scripts/ci.sh passes on my machine.
  • On QEMU (aarch64_virt, 4 CPUs), test_edf logs no [FAIL], and every node of test_dag runs. Every task of test_multi_prioritized_scheduler starts and finishes. No test panics, and the logs match those of main.

Notes for reviewers

#789 was closed, so this PR now targets main.

@atsushi421
atsushi421 added this pull request to stack #791 November 13, 2026 05:21
@atsushi421
atsushi421 force-pushed the refactor/edf-drop-clustered-abstraction branch from 943d13e to 0639476 Compare November 13, 2026 05:50
@atsushi421
atsushi421 force-pushed the feat/edf-budget-global-wakes branch from 9f7658e to 183d771 Compare November 13, 2026 05:50
@atsushi421
atsushi421 removed this pull request from stack #791 November 13, 2026 05:51
@atsushi421
atsushi421 added this pull request to stack #793 November 13, 2026 05:53
@romancardenas
romancardenas force-pushed the refactor/edf-drop-clustered-abstraction branch from 0639476 to bdedf52 Compare November 16, 2026 00:20
After the merge of GEDF into EDF, the EDF scheduler is the only
scheduler whose tasks carry a CPU set. The clustered abstraction
generalized over a family with one member, and its names called global
EDF tasks "clustered".

- get_next_task() calls edf::SCHEDULER directly and then tries
  PRIORITY_LIST[1..]. A compile-time assertion checks that the EDF
  scheduler is first in PRIORITY_LIST. This replaces is_clustered(),
  get_num_clustered_schedulers(), and the prefix assertion.
- Scheduler::queued_cpu_mask() becomes an inherent method of
  EDFScheduler, and wake_workers() calls it directly. This removes
  clustered_queued_cpu_mask().
- ClusteredTask moves into edf.rs as the private QueuedTask, and
  NUM_CLUSTERED_TASKS_IN_QUEUE becomes NUM_EDF_TASKS_IN_QUEUE.
- Comments and the mdbook use EDF terms.

The behavior does not change.

Signed-off-by: atsushi421 <atsushi.yano.2@tier4.jp>
@atsushi421
atsushi421 force-pushed the refactor/edf-drop-clustered-abstraction branch from bdedf52 to 1d82487 Compare November 17, 2026 07:49
@atsushi421
atsushi421 removed this pull request from stack #793 November 17, 2026 07:50
@atsushi421
atsushi421 changed the base branch from feat/edf-budget-global-wakes to main November 17, 2026 07:50
@atsushi421 atsushi421 closed this Nov 17, 2026
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