summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorGabriele Monaco <gmonaco@redhat.com>2026-03-30 13:10:06 +0200
committerGabriele Monaco <gmonaco@redhat.com>2026-03-31 16:47:17 +0200
commit4a24127bd6cbf03fb17de8b43f2d8db3f55ca333 (patch)
tree4dca93eb240a6150107cc8f9e5ca6bdebdc14ab9 /include/linux
parent2b406fdb33387713cb9f880e58e5ff09901c6ebc (diff)
rv: Add support for per-object monitors in DA/HA
RV deterministic and hybrid automata currently only support global, per-cpu and per-task monitors. It isn't possible to write a model that would follow some different type of object, like a deadline entity or a lock. Define the generic per-object monitor implementation which shares part of the implementation with the per-task monitors. The user needs to provide an id for the object (e.g. pid for tasks) and define the data type for the monitor_target (e.g. struct task_struct * for tasks). Both are supplied to the event handlers, as the id may not be easily available in the target. The monitor storage (e.g. the rv monitor, pointer to the target, etc.) is stored in a hash table indexed by id. Monitor storage objects are automatically allocated unless specified otherwise (e.g. if the creation context is unsafe for allocation). Reviewed-by: Nam Cao <namcao@linutronix.de> Link: https://lore.kernel.org/r/20260330111010.153663-9-gmonaco@redhat.com Signed-off-by: Gabriele Monaco <gmonaco@redhat.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/rv.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/rv.h b/include/linux/rv.h
index 0aef9e3c785c..541ba404926a 100644
--- a/include/linux/rv.h
+++ b/include/linux/rv.h
@@ -13,6 +13,7 @@
#define RV_MON_GLOBAL 0
#define RV_MON_PER_CPU 1
#define RV_MON_PER_TASK 2
+#define RV_MON_PER_OBJ 3
#ifdef CONFIG_RV
#include <linux/array_size.h>