forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
scx: Sync schedulers from SCX v0.1.5 (74923c6cdbc3)
- Loading branch information
Showing
20 changed files
with
392 additions
and
144 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# scx_layered | ||
|
||
This is a single user-defined scheduler used within [sched_ext](https://github.com/sched-ext/scx/tree/main), which is a Linux kernel feature which enables implementing kernel thread schedulers in BPF and dynamically loading them. [Read more about sched_ext](https://github.com/sched-ext/scx/tree/main). | ||
|
||
## Overview | ||
|
||
A highly configurable multi-layer BPF / user space hybrid scheduler. | ||
|
||
scx_layered allows the user to classify tasks into multiple layers, and apply | ||
different scheduling policies to those layers. For example, a layer could be | ||
created of all tasks that are part of the `user.slice` cgroup slice, and a | ||
policy could be specified that ensures that the layer is given at least 80% CPU | ||
utilization for some subset of CPUs on the system. | ||
|
||
## How To Install | ||
|
||
Available as a [Rust crate](https://crates.io/crates/scx_layered): `cargo add scx_layered` | ||
|
||
## Typical Use Case | ||
|
||
scx_layered is designed to be highly customizable, and can be targeted for | ||
specific applications. For example, if you had a high-priority service that | ||
required priority access to all but 1 physical core to ensure acceptable p99 | ||
latencies, you could specify that the service would get priority access to all | ||
but 1 core on the system. If that service ends up not utilizing all of those | ||
cores, they could be used by other layers until they're needed. | ||
|
||
## Production Ready? | ||
|
||
Yes. If tuned correctly, scx_layered should be performant across various CPU | ||
architectures and workloads. | ||
|
||
That said, you may run into an issue with infeasible weights, where a task with | ||
a very high weight may cause the scheduler to incorrectly leave cores idle | ||
because it thinks they're necessary to accommodate the compute for a single | ||
task. This can also happen in CFS, and should soon be addressed for | ||
scx_layered. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.