linux-trace-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tomas Glozar <tglozar@redhat.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org,
	 John Kacur <jkacur@redhat.com>,
	Luis Goncalves <lgoncalv@redhat.com>,
	 Arnaldo Carvalho de Melo <acme@kernel.org>,
	Chang Yin <cyin@redhat.com>,
	 Costa Shulyupin <costa.shul@redhat.com>,
	Crystal Wood <crwood@redhat.com>,
	 Gabriele Monaco <gmonaco@redhat.com>
Subject: Re: [PATCH v2 9/9] Documentation/rtla: Add actions feature
Date: Tue, 22 Jul 2025 09:03:24 +0200	[thread overview]
Message-ID: <CAP4=nvQWCWAOefHAqA82-VDb-00_y1-0fPOPBEyETJ2Q1EWEwg@mail.gmail.com> (raw)
In-Reply-To: <20250721183606.0489b1cd@gandalf.local.home>

út 22. 7. 2025 v 0:35 odesílatel Steven Rostedt <rostedt@goodmis.org> napsal:
>
> I'm curious to what is looked for for triggering an action. We can poll on
> events and get woken when they are triggered. It may be possible to add
> even more ways to wake a task waiting for something to happen.
>

Threshold actions are triggered immediately after a sample over the
set threshold is detected by rtla. For BPF mode, this happens almost
right after the sample is processed in the BPF program and the
scheduler gets to waking up rtla following a BPF ringbuffer write.
There is only a short delay (up to tens of microseconds) because the
BPF helper defers the wake-up into irq_work.

For non-BPF mode, rtla periodically pulls samples from tracefs, when
it does that, it also checks whether tracing has been turned off. If
yes, that means there was a threshold overflow, and actions are
triggered. Since the period for that is currently set to 1 second, the
action might be delayed up to one second from the threshold occurring,
That delay might be a problem if you need to collect a lot of data
from a ringbuffer in the action, e.g. global Intel PT data collection
for precise troubleshooting of difficult latencies.

Of course, this is just an implementational limitation of the timerlat
tracer. If timerlat had an event (like osnoise's "sample_threshold")
triggered on threshold overflow and if it is possible to wait on it
even without BPF, rtla could wait on that for both BPF and non-BPF
mode instead of what it is currently doing.

Tomas


  reply	other threads:[~2025-07-22  7:03 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-26 12:33 [PATCH v2 0/9] rtla/timerlat: Support actions on threshold and on end Tomas Glozar
2025-06-26 12:33 ` [PATCH v2 1/9] rtla/timerlat: Introduce enum timerlat_tracing_mode Tomas Glozar
2025-06-26 12:33 ` [PATCH v2 2/9] rtla/timerlat: Add action on threshold feature Tomas Glozar
2025-06-26 12:33 ` [PATCH v2 3/9] rtla/timerlat_bpf: Allow resuming tracing Tomas Glozar
2025-06-26 12:34 ` [PATCH v2 4/9] rtla/timerlat: Add continue action Tomas Glozar
2025-06-26 12:34 ` [PATCH v2 5/9] rtla/timerlat: Add action on end feature Tomas Glozar
2025-06-26 12:34 ` [PATCH v2 6/9] rtla/tests: Check rtla output with grep Tomas Glozar
2025-06-26 12:34 ` [PATCH v2 7/9] rtla/tests: Add tests for actions Tomas Glozar
2025-06-26 12:34 ` [PATCH v2 8/9] rtla/tests: Limit duration to maximum of 10s Tomas Glozar
2025-06-26 12:34 ` [PATCH v2 9/9] Documentation/rtla: Add actions feature Tomas Glozar
2025-07-21 22:36   ` Steven Rostedt
2025-07-22  7:03     ` Tomas Glozar [this message]
2025-07-22 15:29       ` Steven Rostedt
2025-07-23  8:30         ` Tomas Glozar

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='CAP4=nvQWCWAOefHAqA82-VDb-00_y1-0fPOPBEyETJ2Q1EWEwg@mail.gmail.com' \
    --to=tglozar@redhat.com \
    --cc=acme@kernel.org \
    --cc=costa.shul@redhat.com \
    --cc=crwood@redhat.com \
    --cc=cyin@redhat.com \
    --cc=gmonaco@redhat.com \
    --cc=jkacur@redhat.com \
    --cc=lgoncalv@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    /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).