Re: [PATCH v2 14/20] rv: Add sample hybrid monitors stall

From: Nam Cao

Date: Fri Oct 10 2025 - 10:25:18 EST


Gabriele Monaco <gmonaco@xxxxxxxxxx> writes:
> +- Name: stall - wakeup in preemptive
^^^^^^^^^^^^^^^^^^^^
copy-paste mistake?

> +- Type: per-task hybrid automaton
> +- Author: Gabriele Monaco <gmonaco@xxxxxxxxxx>
> +
> +Description
> +-----------
> +
> +The stalled task (stall) monitor is a sample per-task timed monitor that checks
> +if tasks are scheduled within a defined threshold after they are ready::
> +
> + |
> + |
> + v
> + #==================================#
> + H dequeued H <+
> + #==================================# |
> + | |
> + | sched_wakeup;reset(clk) |
> + v |
> + +----------------------------------+ |
> + | enqueued | |
> + | clk < threshold_jiffies | | sched_switch_wait
> + +----------------------------------+ |
> + | |
> + | sched_switch_in |
> + sched_switch_in v |
> + sched_wakeup +----------------------------------+ |
> + +------------------ | | |
> + | | running | |
> + +-----------------> | | -+
> + +----------------------------------+

I think this monitor does not detect if a task get preempted, but then
never get scheduled again?

This sample monitor does not have to cover everything obviously, but I'm
curious if I understand it correct.

Nam