linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Linux Trace Devel <linux-trace-devel@vger.kernel.org>
Cc: Yordan Karadzhov <y.karadz@gmail.com>,
	Jorge Merlino <jorge.merlino@canonical.com>
Subject: [PATCH] Documentation: Update latency description for migration disabled
Date: Fri, 31 Oct 2025 11:55:13 -0400	[thread overview]
Message-ID: <20251031115513.41b86970@gandalf.local.home> (raw)

From: "Steven Rostedt (Google)" <rostedt@goodmis.org>

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 <jorge.merlino@canonical.com>
Closes: https://lore.kernel.org/all/fe35c5eb-7132-4203-9d6f-0a8272b114fa@canonical.com/
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
 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


                 reply	other threads:[~2025-10-31 15:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251031115513.41b86970@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=jorge.merlino@canonical.com \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=y.karadz@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).