From: Wen Yang <[email protected]> Add the Graphviz DOT specification for the tlob (task latency over budget) hybrid automaton.
The model defines three states: running (initial), waiting (in the scheduler runqueue), and sleeping (blocked on a resource), with the transitions: running --(sleep)-------> sleeping running --(preempt)-----> waiting sleeping --(wakeup)------> waiting waiting --(switch_in)--> running A single clock invariant clk_elapsed < BUDGET_NS() is active in all three states. The HA framework enforces it via a per-task hrtimer; expiry emits error_env_tlob and resets the monitor automatically. Suggested-by: Gabriele Monaco <[email protected]> Signed-off-by: Wen Yang <[email protected]> --- MAINTAINERS | 3 +++ tools/verification/models/tlob.dot | 21 +++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 tools/verification/models/tlob.dot diff --git a/MAINTAINERS b/MAINTAINERS index 74c86cf9bc65..beb7224d08ef 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -23317,7 +23317,10 @@ S: Maintained F: Documentation/trace/rv/ F: include/linux/rv.h F: include/rv/ +F: include/uapi/linux/rv.h F: kernel/trace/rv/ +F: samples/rv/ +F: tools/testing/selftests/rv/ F: tools/testing/selftests/verification/ F: tools/verification/ diff --git a/tools/verification/models/tlob.dot b/tools/verification/models/tlob.dot new file mode 100644 index 000000000000..8421b1120e80 --- /dev/null +++ b/tools/verification/models/tlob.dot @@ -0,0 +1,21 @@ +digraph state_automaton { + center = true; + size = "7,11"; + {node [shape = plaintext, style=invis, label=""] "__init_running"}; + {node [shape = ellipse] "running"}; + {node [shape = plaintext] "running"}; + {node [shape = plaintext] "waiting"}; + {node [shape = plaintext] "sleeping"}; + "__init_running" -> "running" [ label = "reset(clk_elapsed)" ]; + "running" [label = "running\nclk_elapsed < BUDGET_NS()", color = green3]; + "waiting" [label = "waiting\nclk_elapsed < BUDGET_NS()"]; + "sleeping" [label = "sleeping\nclk_elapsed < BUDGET_NS()"]; + "running" -> "sleeping" [ label = "sleep" ]; + "running" -> "waiting" [ label = "preempt" ]; + "waiting" -> "running" [ label = "switch_in" ]; + "sleeping" -> "waiting" [ label = "wakeup" ]; + { rank = min ; + "__init_running"; + "running"; + } +} -- 2.25.1
