Skip to content

Commit ac5f07d

Browse files
committed
scx_loader: Add eevdf scheduler
Signed-off-by: Piotr Gorski <lucjan.lucjanov@gmail.com>
1 parent 30e64eb commit ac5f07d

5 files changed

Lines changed: 24 additions & 1 deletion

File tree

‎crates/scx_loader/configuration.md‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,13 @@ gaming_mode = []
118118
lowlatency_mode = []
119119
powersave_mode = []
120120
server_mode = []
121+
122+
[scheds.scx_eevdf]
123+
auto_mode = []
124+
gaming_mode = []
125+
lowlatency_mode = []
126+
powersave_mode = []
127+
server_mode = []
121128
```
122129

123130
**`default_sched`:**
@@ -188,6 +195,8 @@ The example configuration above shows how to set custom flags for different sche
188195
* No custom flags are defined, so the default flags for each mode will be used.
189196
* For `scx_mlfq`:
190197
* No custom flags are defined, so the default flags for each mode will be used.
198+
* For `scx_eevdf`:
199+
* No custom flags are defined, so the default flags for each mode will be used.
191200

192201
### Fallback Behavior
193202

‎crates/scx_loader/default_config.toml‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,3 +97,10 @@ gaming_mode = []
9797
lowlatency_mode = []
9898
powersave_mode = []
9999
server_mode = []
100+
101+
[scheds.scx_eevdf]
102+
auto_mode = []
103+
gaming_mode = []
104+
lowlatency_mode = []
105+
powersave_mode = []
106+
server_mode = []

‎crates/scx_loader/src/config.rs‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ pub fn get_default_config() -> Config {
111111
SupportedSched::Flow,
112112
SupportedSched::Forge,
113113
SupportedSched::MLFQ,
114+
SupportedSched::EEVDF,
114115
];
115116
let scheds_map = HashMap::from(supported_scheds.map(init_default_config_entry));
116117
Config {
@@ -257,7 +258,8 @@ fn get_default_scx_flags_for_mode(
257258
| SupportedSched::Flow
258259
| SupportedSched::Forge
259260
| SupportedSched::Cake
260-
| SupportedSched::MLFQ => vec![],
261+
| SupportedSched::MLFQ
262+
| SupportedSched::EEVDF => vec![],
261263
}
262264
}
263265

‎crates/scx_loader/src/lib.rs‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ pub enum SupportedSched {
4848
Forge,
4949
#[serde(rename = "scx_mlfq")]
5050
MLFQ,
51+
#[serde(rename = "scx_eevdf")]
52+
EEVDF,
5153
}
5254

5355
impl FromStr for SupportedSched {
@@ -59,6 +61,7 @@ impl FromStr for SupportedSched {
5961
"scx_bpfland" => Ok(SupportedSched::Bpfland),
6062
"scx_cake" => Ok(SupportedSched::Cake),
6163
"scx_cosmos" => Ok(SupportedSched::Cosmos),
64+
"scx_eevdf" => Ok(SupportedSched::EEVDF),
6265
"scx_flash" => Ok(SupportedSched::Flash),
6366
"scx_flow" => Ok(SupportedSched::Flow),
6467
"scx_forge" => Ok(SupportedSched::Forge),
@@ -88,6 +91,7 @@ impl From<SupportedSched> for &str {
8891
SupportedSched::Bpfland => "scx_bpfland",
8992
SupportedSched::Cake => "scx_cake",
9093
SupportedSched::Cosmos => "scx_cosmos",
94+
SupportedSched::EEVDF => "scx_eevdf",
9195
SupportedSched::Flash => "scx_flash",
9296
SupportedSched::Flow => "scx_flow",
9397
SupportedSched::Forge => "scx_forge",

‎crates/scx_loader/src/main.rs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ impl ScxLoader {
118118
"scx_bpfland",
119119
"scx_cake",
120120
"scx_cosmos",
121+
"scx_eevdf",
121122
"scx_flash",
122123
"scx_flow",
123124
"scx_forge",

0 commit comments

Comments
 (0)