pub(crate) struct Opts {Show 28 fields
pub(crate) verbose: u8,
pub(crate) log_level: String,
pub(crate) exit_dump_len: u32,
pub(crate) reconfiguration_interval_s: u64,
pub(crate) rebalance_cpus_interval_s: u64,
pub(crate) monitor_interval_s: u64,
pub(crate) monitor: Option<f64>,
pub(crate) version: bool,
pub(crate) run_id: Option<u64>,
pub(crate) debug_events: bool,
pub(crate) exiting_task_workaround: bool,
pub(crate) cpu_controller_disabled: bool,
pub(crate) reject_multicpu_pinning: bool,
pub(crate) enable_llc_awareness: bool,
pub(crate) enable_work_stealing: bool,
pub(crate) cell_parent_cgroup: Option<String>,
pub(crate) cell_exclude: Vec<String>,
pub(crate) enable_borrowing: bool,
pub(crate) use_lockless_peek: bool,
pub(crate) enable_rebalancing: bool,
pub(crate) rebalance_threshold: f64,
pub(crate) rebalance_cooldown_s: u64,
pub(crate) demand_smoothing: f64,
pub(crate) dynamic_affinity_cpu_selection: bool,
pub(crate) enable_slice_shrinking: bool,
pub(crate) slice_shrink_max_us: u64,
pub(crate) slice_shrink_min_us: u64,
pub libbpf: LibbpfOpts,
}Expand description
scx_mitosis: A dynamic affinity scheduler
Cgroups are assigned to a dynamic number of Cells which are assigned to a dynamic set of CPUs. The BPF part does simple vtime scheduling for each cell.
Userspace makes the dynamic decisions of which Cells should be merged or split and which CPUs they should be assigned to.
Fields§
§verbose: u8Deprecated, noop, use RUST_LOG or –log-level instead.
log_level: StringSpecify the logging level. Accepts rust’s envfilter syntax for modular logging: https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#example-syntax. Examples: [“info”, “warn,tokio=info”]
exit_dump_len: u32Exit debug dump buffer length. 0 indicates default.
reconfiguration_interval_s: u64Interval to consider reconfiguring the Cells (e.g. merge or split)
rebalance_cpus_interval_s: u64Interval to consider rebalancing CPUs to Cells
monitor_interval_s: u64Interval to report monitoring information
monitor: Option<f64>Run in stats monitoring mode with the specified interval. Scheduler is not launched.
version: boolPrint scheduler version and exit.
run_id: Option<u64>Optional run ID for tracking scheduler instances.
debug_events: boolEnable debug event tracking for cgroup_init, init_task, and cgroup_exit. Events are recorded in a ring buffer and output in dump().
exiting_task_workaround: boolEnable workaround for exiting tasks with offline cgroups during scheduler load. This works around a kernel bug where tasks can be initialized with cgroups that were never initialized. Disable this once the kernel bug is fixed.
cpu_controller_disabled: boolDisable SCX cgroup callbacks (for when CPU cgroup controller is disabled). Uses tracepoints and cgroup iteration instead.
reject_multicpu_pinning: boolReject tasks with multi-CPU pinning that doesn’t cover the entire cell. By default, these tasks are allowed but may have degraded performance.
enable_llc_awareness: boolEnable LLC-awareness. This will populate the scheduler’s LLC maps and cause it to use LLC-aware scheduling.
enable_work_stealing: boolEnable work stealing. This is only relevant when LLC-awareness is enabled.
cell_parent_cgroup: Option<String>Parent cgroup path whose direct children become cells. When specified, cells are created for each direct child cgroup of this parent, with CPUs divided equally among cells. Example: –cell-parent-cgroup /workloads
cell_exclude: Vec<String>Exact directory name of a direct child cgroup to exclude from cell creation (excluded cgroups remain in cell 0). Matched against the directory basename, not the full path. Can be specified multiple times. Requires –cell-parent-cgroup. Example: –cell-exclude systemd-workaround.service
enable_borrowing: boolEnable CPU borrowing: cells can use idle CPUs from other cells. Only meaningful with –cell-parent-cgroup and multiple cells.
use_lockless_peek: boolUse lockless scx_bpf_dsq_peek() instead of the default iterator-based peek.
enable_rebalancing: boolEnable demand-based CPU rebalancing between cells.
rebalance_threshold: f64Utilization spread (max - min) that triggers rebalancing (default: 20%)
rebalance_cooldown_s: u64Minimum seconds between rebalancing events (default: 5)
demand_smoothing: f64EWMA smoothing factor for demand tracking. Higher = more responsive (default: 0.3)
dynamic_affinity_cpu_selection: boolDynamically reassign multi-CPU affinitized tasks on each wake: prefer an idle CPU within the mask, fall back to random. Redistribute at enqueue if the target CPU already has queued work.
enable_slice_shrinking: boolEnable slice shrinking for CPU-pinned tasks. Uses per-task EWMA runtime to shrink the running task’s slice when pinned waiters are queued.
slice_shrink_max_us: u64Upper bound for shrink limit (us). Used when the proportional value (avg_runtime * K) exceeds it.
slice_shrink_min_us: u64Minimum shrink limit (us). Slices are never shrunk below this value. In practice, the resolution here is determined by the kernel’s tick period.
libbpf: LibbpfOptsTrait Implementations§
Source§impl Args for Opts
impl Args for Opts
Source§fn group_id() -> Option<Id>
fn group_id() -> Option<Id>
ArgGroup::id][crate::ArgGroup::id] for this set of argumentsSource§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command] so it can instantiate self via
[FromArgMatches::update_from_arg_matches_mut] Read moreSource§impl FromArgMatches for Opts
impl FromArgMatches for Opts
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Parser for Opts
impl Parser for Opts
§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
§fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error>
fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error>
Auto Trait Implementations§
impl Freeze for Opts
impl RefUnwindSafe for Opts
impl Send for Opts
impl Sync for Opts
impl Unpin for Opts
impl UnsafeUnpin for Opts
impl UnwindSafe for Opts
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Conv for T
impl<T> Conv for T
§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.