Skip to content

feat(scheduler): Add Least Latest Finish Time (LLFT) scheduler - #815

Merged
atsushi421 merged 3 commits into
tier4:mainfrom
romancardenas:scheduler/llft
Nov 25, 2026
Merged

atsushi421 merged 3 commits into
tier4:mainfrom
romancardenas:scheduler/llft

Conversation

@romancardenas

Copy link
Copy Markdown
Contributor

Description

  • Add per-node TimingInfo estimates during DAG validation, including earliest/latest start and finish, slack, and critical-path membership.
  • Add the clustered Least Latest Finish Time (LLFT) scheduler, which orders DAG tasks by earliest estimated latest-finish time while keeping their real deadlines unchanged. EDF retains higher scheduler priority.
  • Add test_llft, an end-to-end example that pins the DAG to one worker and verifies the earlier-latest-finish branch runs first, even though the other branch is published first.

How was this PR tested?

  • scripts/ci.sh passes on my machine.
  • cargo fmt --all -- --check — passed.
  • cargo test_awkernel_async_lib llft -- --nocapture — passed (2 tests).
  • cargo x86 --features test_llft — passed.
  • cargo clippy_x86 --features test_llft -- -D warnings — passed.
  • make x86_64 OPT='--features debug --features test_llft' — passed.
  • make qemu-x86_64-nographic — QEMU booted with 16 CPUs and printed test_llft: early then late on CPU 1; DAG completed [OK]. QEMU was stopped after the result.

Notes for reviewers

  • LLFT uses WCET-derived estimates for ordering, not as real deadlines; EDF behavior and precedence are preserved.
  • The example’s expected latest-finish offsets are 780 ms for the source, 790 ms for the early branch, and 990 ms for the late branch.
  • LLFT uses the shared clustered scheduler and retains its existing priority-width limitations.
  • I have been looking for a "standard" naming for this scheduler but could not find any. Thus, I decided to call it LLFT. If you can send me literature with better nomenclature, please do so and I will take a look.

@romancardenas

Copy link
Copy Markdown
Contributor Author

The PR is divided into three commits:

  • First, I add the NodeTiming capability to DAG nodes. While I am not using all the fields (e.g., earliest start or the slack), I added them so we can include new scheduling algorithms easily from them (e.g., least laxity first or earliest finish time).
  • Next, I added the LLFT scheduler.
  • Finally, I included a test application that makes sure that LLFT preserves the expected job ordering.

Comment thread awkernel_async_lib/src/dag.rs Resolved
Comment thread awkernel_async_lib/src/dag.rs Resolved
Comment thread awkernel_async_lib/src/dag.rs Resolved
Comment thread mdbook/src/internal/scheduler.md Resolved
Comment thread userland/src/lib.rs Resolved
Comment thread awkernel_async_lib/src/dag.rs Resolved
Comment thread awkernel_async_lib/src/dag.rs Resolved
@atsushi421

Copy link
Copy Markdown
Contributor

@romancardenas

If you can send me literature with better nomenclature, please do so and I will take a look.

LLFT looks fine!

@romancardenas

romancardenas commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor Author

@atsushi421 I addressed your comments!

I think the new JobTimingSnapshot structure will make implementing other schedulers way easier. I might try implementing least slack first after this PR

@atsushi421 atsushi421 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@atsushi421
atsushi421 merged commit 676f4ee into tier4:main Nov 25, 2026
1 check passed
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.

2 participants