Thread (4 messages) read the whole thread 4 messages, 2 authors, 6d ago
COOLING6d

[RFC PATCH] Documentation/rv: Explain epoll and aborted sleeps

From: Chao Liu <hidden>
Date: 2026-07-22 04:57:28
Also in: linux-doc, lkml
Subsystem: documentation, runtime verification (rv), the rest, tracing · Maintainers: Jonathan Corbet, Steven Rostedt, Gabriele Monaco, Linus Torvalds, Masami Hiramatsu

The rtapp sleep monitor accepts epoll_wait() as a valid sleeping
reason, but the prose only discusses clock_nanosleep and futexes. Add
epoll_wait to the list of valid sleeping reasons.

ABORT_SLEEP represents a task restoring TASK_RUNNING before entering
the scheduler, but its meaning is not described. Explain why the
aborted sleep attempt is valid.

This RFC is based on Nam Cao's pending "rv: rtapp monitor update" v2
series:

https://lore.kernel.org/r/cover.1781852967.git.namcao@linutronix.de (local)

Signed-off-by: Chao Liu <redacted>
---
 Documentation/trace/rv/monitor_rtapp.rst | 6 ++++++
 1 file changed, 6 insertions(+)
diff --git a/Documentation/trace/rv/monitor_rtapp.rst b/Documentation/trace/rv/monitor_rtapp.rst
index 238b59395ff5..234ed4d581ac 100644
--- a/Documentation/trace/rv/monitor_rtapp.rst
+++ b/Documentation/trace/rv/monitor_rtapp.rst
@@ -67,6 +67,8 @@ thread to sleep for one of the following reasons:
     variables as safe for real-time. As an alternative, the librtpi library
     exists to provide a conditional variable implementation that is correct for
     real-time applications in Linux.
+  - Real-time thread waiting for events using `epoll_wait`, which the monitor
+    accepts as a valid sleeping reason for real-time tasks.
 
 Beside the reason for sleeping, the eventual waker should also be
 real-time-safe. Namely, one of:
@@ -114,6 +116,10 @@ The monitor's specification is::
   ALLOWLIST = BLOCK_ON_RT_MUTEX
            or FUTEX_LOCK_PI
 
+`ABORT_SLEEP` represents a task restoring its state to `TASK_RUNNING` before
+entering the scheduler. In this case, the task does not actually block, so the
+monitor treats the aborted sleep attempt as valid.
+
 Beside the scenarios described above, this specification also defines an allow list
 to handle some special cases:
 
base-commit: 248951ddc14de84de3910f9b13f51491a8cd91df
prerequisite-patch-id: d8b6c952a954662852e6b0684e0a3386eaab7f41
prerequisite-patch-id: 940f7637aeabe4ba15a09c048c6f48138406f332
prerequisite-patch-id: b99812692691f76d825778e01a2e771e058febd6
prerequisite-patch-id: 512c300dce2cb74ac9cc007f9234aa507ef5c008
-- 
2.54.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help