From: Gabriele Monaco <gmonaco@redhat.com>
To: Tomas Glozar <tglozar@redhat.com>, 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>
Subject: Re: [PATCH 5/5] rtla/timerlat_top: Abort event processing on second signal
Date: Fri, 17 Jan 2025 07:58:50 +0100 [thread overview]
Message-ID: <fa78c382c1aee2acba2aac11b01ee511414af2dc.camel@redhat.com> (raw)
In-Reply-To: <20250116144931.649593-6-tglozar@redhat.com>
On Thu, 2025-01-16 at 15:49 +0100, Tomas Glozar wrote:
> Apply the changes from the previous patch also to timerlat-top.
>
> Signed-off-by: Tomas Glozar <tglozar@redhat.com>
> ---
> tools/tracing/rtla/src/timerlat_top.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/tools/tracing/rtla/src/timerlat_top.c
> b/tools/tracing/rtla/src/timerlat_top.c
> index d21a21053917..d358cd39f360 100644
> --- a/tools/tracing/rtla/src/timerlat_top.c
> +++ b/tools/tracing/rtla/src/timerlat_top.c
> @@ -903,6 +903,14 @@ static int stop_tracing;
> static struct trace_instance *top_inst = NULL;
> static void stop_top(int sig)
> {
> + if (stop_tracing) {
> + /*
> + * Stop requested twice in a row; abort event
> processing and
> + * exit immediately
> + */
> + tracefs_iterate_stop(top_inst->inst);
> + return;
> + }
> stop_tracing = 1;
> if (top_inst)
> trace_instance_stop(top_inst);
I confirm the patchset works as expected on a 128 cores machine.
That is like the machine where the problem was first observed: run
timerlat with -p 100 and it would hang.
Now running it with -d terminates (a bit) after the expiration of the
timer with a sane report, sending a SIGINT terminates it too and
sending 2 SIGINT terminates it almost instantaneously.
This works on both timerlat top and hist, with both -u and -k .
The report only gets printed in the end (as if -q was passed), but
these patches are not meant to fix that.
Tested-by: Gabriele Monaco <gmonaco@redhat.com>
next prev parent reply other threads:[~2025-01-17 6:58 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-16 14:49 [PATCH 0/5] rtla/timerlat: Stop on signal properly when overloaded Tomas Glozar
2025-01-16 14:49 ` [PATCH 1/5] rtla: Add trace_instance_stop Tomas Glozar
2025-01-16 14:49 ` [PATCH 2/5] rtla/timerlat_hist: Stop timerlat tracer on signal Tomas Glozar
2025-01-16 14:49 ` [PATCH 3/5] rtla/timerlat_top: " Tomas Glozar
2025-01-17 0:56 ` Steven Rostedt
2025-01-17 7:13 ` Tomas Glozar
2025-01-17 10:50 ` Steven Rostedt
2025-01-16 14:49 ` [PATCH 4/5] rtla/timerlat_hist: Abort event processing on second signal Tomas Glozar
2025-01-16 14:49 ` [PATCH 5/5] rtla/timerlat_top: " Tomas Glozar
2025-01-17 0:57 ` Steven Rostedt
2025-01-17 6:58 ` Gabriele Monaco [this message]
2025-01-17 0:46 ` [PATCH 0/5] rtla/timerlat: Stop on signal properly when overloaded Steven Rostedt
2025-01-17 12:04 ` Tomas Glozar
2025-01-17 15:29 ` Steven Rostedt
2025-01-17 15:55 ` 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=fa78c382c1aee2acba2aac11b01ee511414af2dc.camel@redhat.com \
--to=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 \
--cc=tglozar@redhat.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