Skip to content

Commit

Permalink
Move scheduling functionality into task; add Scheduler policy tra…
Browse files Browse the repository at this point in the history
…it (#1035)

* Add the `Scheduler` trait, which represents a scheduler policy.
  * By default, there is one instance of a `Scheduler` policy per CPU.
  * Support dynamically registering and switching between
    different scheduler policies on a per-CPU basis.
  * Because this is now defined in the `task` crate instead of in the
    `scheduler` crate, the `task` crate can now access all functionality
    provided by a scheduler policy, which allows for custom actions
    like setting priority or removing/adding blocked/unblocked tasks
    to/from a runqueue.

* Combine `runqueue_*` crates with their respective  and `scheduler_*` crates,
  which is an improved design because external crates should not be able to
  view or modify a scheduler policy's internal runqueue contents.
  * This design makes sense, and also prevents issues like #1000.

* Modify most applications that access runqueues via the old `runqueue_*`
  crate APIs to go through the new `Scheduler` API instead.

----------
Signed-off-by: Klimenty Tsoutsman <klim@tsoutsman.com>
Co-authored-by: Kevin Boos <kevinaboos@gmail.com> 810e12f
  • Loading branch information
kevinaboos committed Oct 3, 2023
1 parent 9b39525 commit b7ff381
Show file tree
Hide file tree
Showing 180 changed files with 1,546 additions and 5,214 deletions.
2 changes: 1 addition & 1 deletion doc/crates.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 4 additions & 7 deletions doc/implementors/core/clone/trait.Clone.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion doc/implementors/core/cmp/trait.Eq.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion doc/implementors/core/cmp/trait.Ord.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b7ff381

Please sign in to comment.