On Fri, 2025-10-10 at 16:23 +0200, Nam Cao wrote:
> Gabriele Monaco <[email protected]> writes:
> > +- Name: stall - wakeup in preemptive
>                    ^^^^^^^^^^^^^^^^^^^^
>                    copy-paste mistake?

Damn, right..

> > +- Type: per-task hybrid automaton
> > +- Author: Gabriele Monaco <[email protected]>
> > +
> > +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.

Yes, that's right. I think I could cover that scenario by just going back to
enqueued and resetting when preempted. Since it's a simple change, it's probably
something meaningful to do..

Thanks,
Gabriele

Reply via email to