Skip to content

Commit 7bc4d30

Browse files
Daniel Bristot de Oliveirarostedt
authored andcommitted
rtla/hwnoise: Reduce runtime to 75%
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 <[email protected]> Cc: Jonathan Corbet <[email protected]> Tested-by: Juri Lelli <[email protected]> Fixes: 1f42835 ("rtla: Add hwnoise tool") Signed-off-by: Daniel Bristot de Oliveira <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
1 parent 57cf76e commit 7bc4d30

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tools/tracing/rtla/src/osnoise_top.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,8 +348,14 @@ struct osnoise_top_params *osnoise_top_parse_args(int argc, char **argv)
348348
if (!params)
349349
exit(1);
350350

351-
if (strcmp(argv[0], "hwnoise") == 0)
351+
if (strcmp(argv[0], "hwnoise") == 0) {
352352
params->mode = MODE_HWNOISE;
353+
/*
354+
* Reduce CPU usage for 75% to avoid killing the system.
355+
*/
356+
params->runtime = 750000;
357+
params->period = 1000000;
358+
}
353359

354360
while (1) {
355361
static struct option long_options[] = {

0 commit comments

Comments
 (0)