Skip to content

Commit

Permalink
Merge pull request #248 from sched-ext/rustland-update-version
Browse files Browse the repository at this point in the history
rustland: bump up version
  • Loading branch information
htejun authored Apr 28, 2024
2 parents 0495a52 + 5effb4f commit d9ea53c
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 6 deletions.
2 changes: 1 addition & 1 deletion rust/scx_rustland_core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "scx_rustland_core"
version = "0.2.0"
version = "0.3.0"
edition = "2021"
authors = ["Andrea Righi <[email protected]>"]
license = "GPL-2.0-only"
Expand Down
2 changes: 2 additions & 0 deletions rust/scx_rustland_core/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
mod bindings;

pub const VERSION: &'static str = env!("CARGO_PKG_VERSION");

mod alloc;
pub use alloc::ALLOCATOR;

Expand Down
4 changes: 2 additions & 2 deletions scheds/rust/scx_rlfifo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ ctrlc = { version = "3.1", features = ["termination"] }
libbpf-rs = "0.23"
libc = "0.2.137"
scx_utils = { path = "../../../rust/scx_utils", version = "0.7" }
scx_rustland_core = { path = "../../../rust/scx_rustland_core", version = "0.2" }
scx_rustland_core = { path = "../../../rust/scx_rustland_core", version = "0.3" }

[build-dependencies]
scx_utils = { path = "../../../rust/scx_utils", version = "0.7" }
scx_rustland_core = { path = "../../../rust/scx_rustland_core", version = "0.2" }
scx_rustland_core = { path = "../../../rust/scx_rustland_core", version = "0.3" }

[features]
enable_backtrace = []
6 changes: 3 additions & 3 deletions scheds/rust/scx_rustland/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "scx_rustland"
version = "0.0.4"
version = "0.0.5"
authors = ["Andrea Righi <[email protected]>", "Canonical"]
edition = "2021"
description = "A BPF component (dispatcher) that implements the low level sched-ext functionalities and a user-space counterpart (scheduler), written in Rust, that implements the actual scheduling policy. This is used within sched_ext, which is a Linux kernel feature which enables implementing kernel thread schedulers in BPF and dynamically loading them. https://github.com/sched-ext/scx/tree/main"
Expand All @@ -16,12 +16,12 @@ libc = "0.2.137"
log = "0.4.17"
ordered-float = "3.4.0"
scx_utils = { path = "../../../rust/scx_utils", version = "0.7" }
scx_rustland_core = { path = "../../../rust/scx_rustland_core", version = "0.2" }
scx_rustland_core = { path = "../../../rust/scx_rustland_core", version = "0.3" }
simplelog = "0.12.0"

[build-dependencies]
scx_utils = { path = "../../../rust/scx_utils", version = "0.7" }
scx_rustland_core = { path = "../../../rust/scx_rustland_core", version = "0.2" }
scx_rustland_core = { path = "../../../rust/scx_rustland_core", version = "0.3" }

[features]
enable_backtrace = []
16 changes: 16 additions & 0 deletions scheds/rust/scx_rustland/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ use log::warn;

const SCHEDULER_NAME: &'static str = "RustLand";

const VERSION: &'static str = env!("CARGO_PKG_VERSION");

/// scx_rustland: user-space scheduler written in Rust
///
/// scx_rustland is designed to prioritize interactive workloads over background CPU-intensive
Expand Down Expand Up @@ -141,6 +143,10 @@ struct Opts {
/// debugfs (e.g., /sys/kernel/debug/tracing/trace_pipe).
#[clap(short = 'd', long, action = clap::ArgAction::SetTrue)]
debug: bool,

/// Print scheduler version and exit.
#[clap(short = 'v', long, action = clap::ArgAction::SetTrue)]
version: bool,
}

// Time constants.
Expand Down Expand Up @@ -754,6 +760,16 @@ impl<'a> Drop for Scheduler<'a> {
fn main() -> Result<()> {
let opts = Opts::parse();

if opts.version {
println!(
"{} version {} - scx_rustland_core {}",
SCHEDULER_NAME,
VERSION,
scx_rustland_core::VERSION
);
return Ok(());
}

let loglevel = simplelog::LevelFilter::Info;

let mut lcfg = simplelog::ConfigBuilder::new();
Expand Down

0 comments on commit d9ea53c

Please sign in to comment.