mirror of
https://github.com/JakeHillion/scx.git
synced 2024-11-26 11:30:22 +00:00
scx_rustland: allow to disable the slice boost completely
Allow to specify `-b 0` to completely disable the slice boost logic and fallback to standard vruntime-based scheduler with variable time slice. In this way interactive tasks will not get over-prioritized over the other tasks in the system. Having this option can help to easily track down potential performance regressions arising for over-prioritizing interactive tasks. Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
This commit is contained in:
parent
b4269452fc
commit
ab1c4f66a8
@ -95,7 +95,7 @@ struct Opts {
|
||||
/// Default time slice boost is 100, which means interactive tasks will get a 100x priority
|
||||
/// boost to run respect to non-interactive tasks.
|
||||
///
|
||||
/// Use "1" to disable time slice boost and fallback to the standard vruntime-based scheduling.
|
||||
/// Use "0" to disable time slice boost and fallback to the standard vruntime-based scheduling.
|
||||
#[clap(short = 'b', long, default_value = "100")]
|
||||
slice_boost: u64,
|
||||
|
||||
@ -221,8 +221,8 @@ impl<'a> Scheduler<'a> {
|
||||
// Save the default time slice (in ns) in the scheduler class.
|
||||
let slice_ns = opts.slice_us * MSEC_PER_SEC;
|
||||
|
||||
// Slice booster (must be >= 1).
|
||||
let slice_boost = opts.slice_boost.max(1);
|
||||
// Slice booster (0 = disabled).
|
||||
let slice_boost = opts.slice_boost;
|
||||
let eff_slice_boost = slice_boost;
|
||||
|
||||
// Scheduler task pool to sort tasks by vruntime.
|
||||
|
Loading…
Reference in New Issue
Block a user