linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Bristot de Oliveira <bristot@kernel.org>
To: linux-trace-devel@vger.kernel.org, Steven Rostedt <rostedt@goodmis.org>
Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	Juri Lelli <juri.lelli@redhat.com>,
	William White <chwhite@redhat.com>,
	Daniel Bristot de Oliveira <bristot@kernel.org>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	Jonathan Corbet <corbet@lwn.net>
Subject: [PATCH 8/8] rtla/hwnoise: Reduce runtime to 75%
Date: Thu, 11 May 2023 20:04:26 +0200	[thread overview]
Message-ID: <09fd28d1be7a5f3e01da1c2c007cf56790635f39.1683827510.git.bristot@kernel.org> (raw)
In-Reply-To: <cover.1683827510.git.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.

Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Daniel Bristot de Oliveira <bristot@kernel.org>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Fixes: 1f428356c38d ("rtla: Add hwnoise tool")
Signed-off-by: Daniel Bristot de Oliveira <bristot@kernel.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.38.1


  parent reply	other threads:[~2023-05-11 18:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-11 18:04 [PATCH 0/8] rtla improvements Daniel Bristot de Oliveira
2023-05-11 18:04 ` [PATCH 1/8] rtla: Add -C cgroup support Daniel Bristot de Oliveira
2023-05-11 18:04 ` [PATCH 2/8] rtla: Add --house-keeping option Daniel Bristot de Oliveira
2023-05-11 18:04 ` [PATCH 3/8] rtla: Change monitored_cpus from char * to cpu_set_t Daniel Bristot de Oliveira
2023-05-11 18:04 ` [PATCH 4/8] rtla: Automatically move rtla to a house-keeping cpu Daniel Bristot de Oliveira
2023-05-11 18:04 ` [PATCH 5/8] rtla/timerlat: Give timerlat auto-analysis its own instance Daniel Bristot de Oliveira
2023-05-11 18:04 ` [PATCH 6/8] rtla/timerlat_hist: Add auto-analysis support Daniel Bristot de Oliveira
2023-05-11 18:04 ` [PATCH 7/8] rtla: Start the tracers after creating all instances Daniel Bristot de Oliveira
2023-05-11 18:04 ` Daniel Bristot de Oliveira [this message]
2023-05-11 18:04 ` 0001-rtla-Add-C-cgroup-support.patch Daniel Bristot de Oliveira
2023-05-11 18:08   ` 0001-rtla-Add-C-cgroup-support.patch Daniel Bristot de Oliveira

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=09fd28d1be7a5f3e01da1c2c007cf56790635f39.1683827510.git.bristot@kernel.org \
    --to=bristot@kernel.org \
    --cc=chwhite@redhat.com \
    --cc=corbet@lwn.net \
    --cc=juri.lelli@redhat.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=mhiramat@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).