All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Daniel Bristot de Oliveira <bristot@kernel.org>,
	William White <chwhite@redhat.com>,
	Jonathan Corbet <corbet@lwn.net>,
	Juri Lelli <juri.lelli@redhat.com>
Subject: [for-next][PATCH 08/11] rtla/hwnoise: Reduce runtime to 75%
Date: Tue, 13 Jun 2023 18:07:58 -0400	[thread overview]
Message-ID: <20230613220824.813403175@goodmis.org> (raw)
In-Reply-To: 20230613220750.330146797@goodmis.org

From: Daniel Bristot de Oliveira <bristot@kernel.org>

osnoise runs 100% of time by default. It makes sense because osnoise
is preemptive. hwnoise checks preemption once a second, so it
reduces system progress.

Reduce runtime to 75% to avoid problems by default. I added a Fixes
as it might avoid problems for first time users as it lands on distros.

Link: https://lkml.kernel.org/r/af0b7113ffc00031b9af4bb40ef5889a27dadf8c.1686066600.git.bristot@kernel.org

Cc: William White <chwhite@redhat.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Tested-by: Juri Lelli <juri.lelli@redhat.com>
Fixes: 1f428356c38d ("rtla: Add hwnoise tool")
Signed-off-by: Daniel Bristot de Oliveira <bristot@kernel.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
 tools/tracing/rtla/src/osnoise_top.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/tools/tracing/rtla/src/osnoise_top.c b/tools/tracing/rtla/src/osnoise_top.c
index 85abba568faf..f7c959be8677 100644
--- a/tools/tracing/rtla/src/osnoise_top.c
+++ b/tools/tracing/rtla/src/osnoise_top.c
@@ -348,8 +348,14 @@ struct osnoise_top_params *osnoise_top_parse_args(int argc, char **argv)
 	if (!params)
 		exit(1);
 
-	if (strcmp(argv[0], "hwnoise") == 0)
+	if (strcmp(argv[0], "hwnoise") == 0) {
 		params->mode = MODE_HWNOISE;
+		/*
+		 * Reduce CPU usage for 75% to avoid killing the system.
+		 */
+		params->runtime = 750000;
+		params->period = 1000000;
+	}
 
 	while (1) {
 		static struct option long_options[] = {
-- 
2.39.2

  parent reply	other threads:[~2023-06-13 22:08 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-13 22:07 [for-next][PATCH 00/11] tracing/tools: Updates for 6.5 Steven Rostedt
2023-06-13 22:07 ` [for-next][PATCH 01/11] rtla: Add -C cgroup support Steven Rostedt
2023-06-13 22:07 ` [for-next][PATCH 02/11] rtla: Add --house-keeping option Steven Rostedt
2023-06-13 22:07 ` [for-next][PATCH 03/11] rtla: Change monitored_cpus from char * to cpu_set_t Steven Rostedt
2023-06-13 22:07 ` [for-next][PATCH 04/11] rtla: Automatically move rtla to a house-keeping cpu Steven Rostedt
2023-06-13 22:07 ` [for-next][PATCH 05/11] rtla/timerlat: Give timerlat auto analysis its own instance Steven Rostedt
2023-06-13 22:07 ` [for-next][PATCH 06/11] rtla/timerlat_hist: Add auto-analysis support Steven Rostedt
2023-06-13 22:07 ` [for-next][PATCH 07/11] rtla: Start the tracers after creating all instances Steven Rostedt
2023-06-13 22:07 ` Steven Rostedt [this message]
2023-06-13 22:07 ` [for-next][PATCH 09/11] rtla/timerlat_top: Add timerlat user-space support Steven Rostedt
2023-06-13 22:08 ` [for-next][PATCH 10/11] rtla/timerlat_hist: " Steven Rostedt
2023-06-13 22:08 ` [for-next][PATCH 11/11] Documentation: Add tools/rtla timerlat -u option documentation Steven Rostedt

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=20230613220824.813403175@goodmis.org \
    --to=rostedt@goodmis.org \
    --cc=bristot@kernel.org \
    --cc=chwhite@redhat.com \
    --cc=corbet@lwn.net \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.