Thread (57 messages) 57 messages, 3 authors, 2025-10-24

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

From: Gabriele Monaco <gmonaco@redhat.com>
Date: 2025-10-13 09:01:49
Also in: linux-doc, lkml

On Fri, 2025-10-10 at 16:23 +0200, Nam Cao wrote:
Gabriele Monaco [off-list ref] writes:
quoted
+- Name: stall - wakeup in preemptive
                   ^^^^^^^^^^^^^^^^^^^^
                   copy-paste mistake?
Damn, right..
quoted
+- Type: per-task hybrid automaton
+- Author: Gabriele Monaco [off-list ref]
+
+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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help