-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Custom Scheduling * Capturing cgroup stats on per invoke level * BPFLibrary to create a pinned BPFMap of function characteristics * used to share data with scx scheduler clippy changes
- Loading branch information
1 parent
ba8fb72
commit e215d44
Showing
77 changed files
with
4,190 additions
and
94 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,5 @@ __pycache__/*.lock | |
**.lock | ||
**__pycache__** | ||
.idea/ | ||
.vscode/ | ||
.vscode/ | ||
**.swp |
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
Empty file.
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,33 @@ | ||
[package] | ||
name = "fs_policy_tsksz" | ||
version = "0.0.3" | ||
authors = ["Abdul Rehman <abdulrehmanee010@gmail.com>"] | ||
edition = "2021" | ||
description = "A simple scheduler that preserves locality for a function cgroup" | ||
license = "GPL-2.0-only" | ||
|
||
[dependencies] | ||
anyhow = "1.0.65" | ||
plain = "0.2.3" | ||
ctrlc = { version = "3.1", features = ["termination"] } | ||
libbpf-rs = "0.24.1" | ||
libc = "0.2.137" | ||
scx_utils = { version = "1.0.3" } | ||
scx_rustland_core = { version = "1.0.3" } | ||
|
||
# Specific to iluvatar | ||
iluvatar_library = { path = "../iluvatar_library" } | ||
iluvatar_worker_library = { path = "../iluvatar_worker_library" } | ||
clap = { version = "4.5.4", features = ["derive"] } | ||
ipc-channel = { version = "0.18.1", features = ["memfd"] } | ||
serde = { version = "1.0" } | ||
|
||
[build-dependencies] | ||
scx_utils = { version = "1.0.3" } | ||
scx_rustland_core = { version = "1.0.3" } | ||
|
||
[features] | ||
enable_backtrace = [] | ||
|
||
|
||
|
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 @@ | ||
../../../LICENSE |
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,20 @@ | ||
# scx_rlfifo | ||
|
||
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 | ||
|
||
scx_rlfifo is a simple FIFO scheduler runs in user-space, based on the | ||
scx_rustland_core framework. | ||
|
||
## Typical Use Case | ||
|
||
This scheduler is provided as a simple template that can be used as a baseline | ||
to test more complex scheduling policies. | ||
|
||
## Production Ready? | ||
|
||
Definitely not. Using this scheduler in a production environment is not | ||
recommended, unless there are specific requirements that necessitate a basic | ||
FIFO scheduling approach. Even then, it's still recommended to use the kernel's | ||
SCHED_FIFO real-time class. |
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,11 @@ | ||
// This software may be used and distributed according to the terms of the | ||
// GNU General Public License version 2. | ||
|
||
fn main() { | ||
scx_utils::BpfBuilder::new() | ||
.unwrap() | ||
.enable_intf("src/bpf/intf.h", "bpf_intf.rs") | ||
.enable_skel("src/bpf/main.bpf.c", "bpf") | ||
.build() | ||
.unwrap(); | ||
} |
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,14 @@ | ||
if serialize | ||
sched_deps = [libbpf, bpftool_target, sched] | ||
else | ||
sched_deps = [libbpf, bpftool_target] | ||
endif | ||
|
||
sched = custom_target('scx_rlfifo', | ||
output: '@PLAINNAME@.__PHONY__', | ||
input: 'Cargo.toml', | ||
command: [cargo, 'build', '--manifest-path=@INPUT@', '--target-dir=@OUTDIR@', | ||
cargo_build_args], | ||
env: cargo_env, | ||
depends: sched_deps, | ||
build_always_stale: true) |
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,8 @@ | ||
# Get help on options with `rustfmt --help=config` | ||
# Please keep these in alphabetical order. | ||
edition = "2021" | ||
group_imports = "StdExternalCrate" | ||
imports_granularity = "Item" | ||
merge_derives = false | ||
use_field_init_shorthand = true | ||
version = "Two" |
Oops, something went wrong.