pub(crate) struct Opts {Show 32 fields
pub(crate) exit_dump_len: u32,
pub(crate) slice_us: u64,
pub(crate) slice_us_min: u64,
pub(crate) slice_us_lag: u64,
pub(crate) slice_lag_scaling: bool,
pub(crate) run_us_lag: u64,
pub(crate) max_avg_nvcsw: u64,
pub(crate) cpu_busy_thresh: i64,
pub(crate) throttle_us: u64,
pub(crate) idle_resume_us: i64,
pub(crate) tickless: bool,
pub(crate) rr_sched: bool,
pub(crate) no_builtin_idle: bool,
pub(crate) local_pcpu: bool,
pub(crate) direct_dispatch: bool,
pub(crate) sticky_cpu: bool,
pub(crate) native_priority: bool,
pub(crate) local_kthreads: bool,
pub(crate) no_wake_sync: bool,
pub(crate) primary_domain: String,
pub(crate) disable_l2: bool,
pub(crate) disable_l3: bool,
pub(crate) disable_smt: bool,
pub(crate) disable_numa: bool,
pub(crate) cpufreq: bool,
pub(crate) stats: Option<f64>,
pub(crate) monitor: Option<f64>,
pub(crate) debug: bool,
pub(crate) verbose: bool,
pub(crate) version: bool,
pub(crate) help_stats: bool,
pub libbpf: LibbpfOpts,
}Fields§
§exit_dump_len: u32Exit debug dump buffer length. 0 indicates default.
slice_us: u64Maximum scheduling slice duration in microseconds.
slice_us_min: u64Minimum scheduling slice duration in microseconds.
slice_us_lag: u64Maximum runtime budget that a task can accumulate while sleeping (in microseconds).
Increasing this value can help to enhance the responsiveness of interactive tasks, but it can also make performance more “spikey”.
slice_lag_scaling: boolDynamically adjust task’s maximum sleep budget based on CPU utilization.
Enabling this option allows to increase the throughput of highly message passing workloads, but it can also reduce the overall system responsiveness.
run_us_lag: u64Maximum runtime penalty that a task can accumulate while running (in microseconds).
Increasing this value can help to enhance the responsiveness of interactive tasks, but it can also make performance more “spikey”.
max_avg_nvcsw: u64Maximum rate of voluntary context switches.
Increasing this value can help prioritize interactive tasks with a higher sleep frequency over interactive tasks with lower sleep frequency.
Decreasing this value makes the scheduler more robust and fair.
(0 = disable voluntary context switch prioritization).
cpu_busy_thresh: i64Utilization percentage to consider a CPU as busy (-1 = auto).
A value close to 0 forces tasks to migrate quickier, increasing work conservation and potentially system responsiveness.
A value close to 100 makes tasks more sticky to their CPU, increasing cache-sensivite and server-type workloads.
In auto mode (-1) the scheduler autoomatically tries to determine the optimal value in function of the current workload.
throttle_us: u64Throttle the running CPUs by periodically injecting idle cycles.
This option can help extend battery life on portable devices, reduce heating, fan noise and overall energy consumption (0 = disable).
idle_resume_us: i64Set CPU idle QoS resume latency in microseconds (-1 = disabled).
Setting a lower latency value makes CPUs less likely to enter deeper idle states, enhancing performance at the cost of higher power consumption. Alternatively, increasing the latency value may reduce performance, but also improve power efficiency.
tickless: boolEnable tickless mode.
This option enables tickless mode: tasks get an infinite time slice and they are preempted only in case of CPU contention. This can help reduce the OS noise and provide a better level of performance isolation.
rr_sched: boolEnable round-robin scheduling.
Each task is given a fixed time slice (defined by –slice-us) and run in a cyclic, fair order.
no_builtin_idle: boolDisable in-kernel idle CPU selection policy.
Set this option to disable the in-kernel built-in idle CPU selection policy and rely on the custom CPU selection policy.
local_pcpu: boolEnable per-CPU tasks prioritization.
Enabling this option allows to prioritize per-CPU tasks that usually tend to be de-prioritized, since they can’t be migrated when their only usable CPU is busy. This improves fairness, but it can also reduce the overall system throughput.
This option is recommended for gaming or latency-sensitive workloads.
direct_dispatch: boolAlways allow direct dispatch to idle CPUs.
By default tasks are not directly dispatched to idle CPUs if there are other tasks waiting in the scheduler’s queues. This prevents potential starvation of the already queued tasks.
Enabling this option allows tasks to be always dispatched directly to idle CPUs, potentially bypassing the scheduler queues.
This allows to improve system throughput, especially with server workloads, but it can introduce unfairness and potentially trigger stall conditions.
sticky_cpu: boolEnable CPU stickiness.
Enabling this option can reduce the amount of task migrations, but it can also make performance less consistent on systems with hybrid cores.
This option has no effect if the primary scheduling domain includes all the CPUs
(e.g., --primary-domain all).
native_priority: boolNative tasks priorities.
By default, the scheduler normalizes task priorities to avoid large gaps that could lead to stalls or starvation. This option disables normalization and uses the default Linux priority range instead.
local_kthreads: boolEnable per-CPU kthread prioritization.
Enabling this can improve system performance, but it may also introduce interactivity issues or unfairness in scenarios with high kthread activity, such as heavy I/O or network traffic.
no_wake_sync: boolDisable direct dispatch during synchronous wakeups.
Enabling this option can lead to a more uniform load distribution across available cores, potentially improving performance in certain scenarios. However, it may come at the cost of reduced efficiency for pipe-intensive workloads that benefit from tighter producer-consumer coupling.
primary_domain: StringSpecifies the initial set of CPUs, represented as a bitmask in hex (e.g., 0xff), that the scheduler will use to dispatch tasks, until the system becomes saturated, at which point tasks may overflow to other available CPUs.
Special values:
- “auto” = automatically detect the CPUs based on the active power profile
- “turbo” = automatically detect and prioritize the CPUs with the highest max frequency
- “performance” = automatically detect and prioritize the fastest CPUs
- “powersave” = automatically detect and prioritize the slowest CPUs
- “all” = all CPUs assigned to the primary domain
- “none” = no prioritization, tasks are dispatched on the first CPU available
disable_l2: boolDisable L2 cache awareness.
disable_l3: boolDisable L3 cache awareness.
disable_smt: boolDisable SMT awareness.
disable_numa: boolDisable NUMA rebalancing.
cpufreq: boolEnable CPU frequency control (only with schedutil governor).
With this option enabled the CPU frequency will be automatically scaled based on the load.
stats: Option<f64>Enable stats monitoring with the specified interval.
monitor: Option<f64>Run in stats monitoring mode with the specified interval. Scheduler is not launched.
debug: boolEnable BPF debugging via /sys/kernel/tracing/trace_pipe.
verbose: boolEnable verbose output, including libbpf details.
version: boolPrint scheduler version and exit.
help_stats: boolShow descriptions for statistics.
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 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.