diff --git a/scheds/rust/scx_bpfland/src/main.rs b/scheds/rust/scx_bpfland/src/main.rs index 9f170b2..f3e9607 100644 --- a/scheds/rust/scx_bpfland/src/main.rs +++ b/scheds/rust/scx_bpfland/src/main.rs @@ -166,8 +166,6 @@ struct Scheduler<'a> { skel: BpfSkel<'a>, struct_ops: Option, metrics: Metrics, - slice_ns: u64, - slice_ns_min: u64, } impl<'a> Scheduler<'a> { @@ -223,15 +221,9 @@ impl<'a> Scheduler<'a> { skel, struct_ops, metrics: Metrics::new(), - slice_ns: opts.slice_us * 1000, - slice_ns_min: opts.slice_us_min * 1000, }) } - fn effective_slice(&self, nr_waiting: u64) -> u64 { - std::cmp::max(self.slice_ns / (nr_waiting + 1), self.slice_ns_min) - } - fn update_stats(&mut self) { let nr_cpus = self.skel.maps.bss_data.nr_online_cpus; let nr_running = self.skel.maps.bss_data.nr_running; @@ -264,15 +256,13 @@ impl<'a> Scheduler<'a> { .nr_shared_dispatches .set(nr_shared_dispatches as f64); - let slice_ms = self.effective_slice(nr_waiting) as f64 / 1_000_000.0; - // Log scheduling statistics. - info!("running: {:>4}/{:<4} interactive: {:<4} wait: {:<4} | slice: {:5.2}ms | nvcsw: {:<4} | direct: {:<6} prio: {:<6} shared: {:<6}", + info!("[{}] tasks -> run: {:>2}/{:<2} int: {:<2} wait: {:<4} | nvcsw: {:<4} | dispatch -> dir: {:<5} prio: {:<5} shr: {:<5}", + SCHEDULER_NAME, nr_running, nr_cpus, nr_interactive, nr_waiting, - slice_ms, nvcsw_avg_thresh, nr_direct_dispatches, nr_prio_dispatches,