Skip to content

Comments

Fix scheduler cancellation/state visibility and NUMA mapping#6

Open
yunuservices wants to merge 2 commits intoTuinity:masterfrom
yunuservices:fix/scheduler-numa-cancel-state
Open

Fix scheduler cancellation/state visibility and NUMA mapping#6
yunuservices wants to merge 2 commits intoTuinity:masterfrom
yunuservices:fix/scheduler-numa-cancel-state

Conversation

@yunuservices
Copy link

@yunuservices yunuservices commented Feb 20, 2026

This PR fixes several scheduler/NUMA correctness issues introduced by the scheduler refactor.

  • Fix Linux NUMA CPU->node mapping assignment in LinuxNuma so mapped CPUs are always updated.
  • Make SchedulableTick state visibility thread-safe (volatile) and access it via accessor.
  • Enforce scheduledStart validation in EDFSchedulerThreadPool.schedule(...).

Why

  • Incorrect CPU->NUMA mapping could produce wrong locality decisions.
  • Unsafely published task state could cause stale reads under concurrency.
  • EDF scheduling accepted tasks without start deadlines.
  • EDF cancellation path defined cancel state but did not reliably apply it.
  • Work-stealing score calculation could hit divide-by-zero on invalid distance values.

(I wrote text wrong, edited now.)

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