[PATCH] Documentation: Update latency description for migration disabled

Steven Rostedt <[email protected]> Fri, 31 Oct 2025 11:55:13 -0400
Newsgroups org.kernel.vger.linux-trace-devel
Message-ID <[email protected]>
From: "Steven Rostedt (Google)" <[email protected]>

Starting in 5.11, the Linux kernel implemented a "migrate disabled"
counter for each task. When the counter is non-zero, the task will be
temporarily pinned to its CPU. This is useful for accessing per CPU data
that is protected by a per CPU mutex. The task can still be preempted, but
it must not leave the CPU. When its "migrate disabled" counter is greater
than zero, it will not migrate.

The latency field of the tracer now shows this number. Updated the
documentation to explain it.

Reported-by: Jorge Merlino <[email protected]>
Closes: https://lore.kernel.org/all/[email protected]/
Signed-off-by: Steven Rostedt (Google) <[email protected]>
---
 Documentation/HTML/index.html | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/Documentation/HTML/index.html b/Documentation/HTML/index.html
index 7dac810bebbd..281307735289 100644
--- a/Documentation/HTML/index.html
+++ b/Documentation/HTML/index.html
@@ -353,7 +353,7 @@ The columns of the list are:
 resolution.
 <li><b>Task</b> - The name of the process that was running when the event occurred.
 <li><b>PID</b> - The process ID of the task that was running when the event occurred.
-<li><b><a name="latency">Latency</a></b> -  The latency is broken into 4 fields:
+<li><b><a name="latency">Latency</a></b> -  The latency is broken into 4 or 5 fields:
   <ol>
     <li>Interrupts disabled - 'd' if interrupts are disabled, otherwise '.'
     <li>Need reschedule - 'N' if the kernel was notified that a schedule is needed, otherwise '.'
@@ -365,6 +365,12 @@ resolution.
       than zero, then the kernel will not preempt the running tasks, even
       if a schedule has been requested by some event. If the counter is zero,
       then '.' is shown.
+    <li>Migrate disabled counter - Starting in Linux kernel version 5.11, a task can
+      be temporarily pinned to the CPU. For accessing critical sections that are protected
+      by a per-CPU mutex, the task will need to stay on the current CPU. A "migrate_disable()"
+      call is performed that increments the task's "migrate disabled counter" and will pin
+      the task to the CPU. If the kernel has this feature, this number will be displayed
+      as the 5th argument when it is not zero. Otherwise it will be '.'.
   </ol>
   <p>Note: These may be different depending on the kernel the trace.dat file came from.</p>
 <li><b>Event</b> - The name of the event.
-- 
2.51.0