mirror of
https://github.com/sched-ext/scx.git
synced 2024-11-25 04:00:24 +00:00
scx_rustland: report nr_running metric to stdout
Report the amount of running tasks to stdout. This value also represents the amount of active CPUs that are currently executing a task. Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
This commit is contained in:
parent
aae4ed5b46
commit
9a2cc6be50
@ -681,13 +681,14 @@ impl<'a> Scheduler<'a> {
|
||||
nr_cancel_dispatches, nr_bounce_dispatches,
|
||||
);
|
||||
|
||||
// Show tasks that are waiting to be dispatched.
|
||||
// Show tasks that are running or waiting to be dispatched.
|
||||
let nr_running = *self.bpf.nr_running_mut();
|
||||
let nr_queued = *self.bpf.nr_queued_mut();
|
||||
let nr_scheduled = *self.bpf.nr_scheduled_mut();
|
||||
let nr_waiting = nr_queued + nr_scheduled;
|
||||
info!(
|
||||
" nr_waiting={} [nr_queued={} + nr_scheduled={}]",
|
||||
nr_waiting, nr_queued, nr_scheduled
|
||||
" nr_running={} nr_waiting={} [nr_queued={} + nr_scheduled={}]",
|
||||
nr_running, nr_waiting, nr_queued, nr_scheduled
|
||||
);
|
||||
|
||||
// Show total page faults of the user-space scheduler.
|
||||
|
Loading…
Reference in New Issue
Block a user