summaryrefslogtreecommitdiff
path: root/tools/tracing/rtla/src/timerlat_top.c
diff options
context:
space:
mode:
authorDaniel Bristot de Oliveira <bristot@kernel.org>2023-06-06 18:12:18 +0200
committerSteven Rostedt (Google) <rostedt@goodmis.org>2023-06-13 16:30:13 -0400
commitc58a3f8c7f974d171d1b6897a71a078a3bc7afd3 (patch)
tree0472462ef502afd887f242445974cb8e4780b327 /tools/tracing/rtla/src/timerlat_top.c
parent894c29c76b2b4c2cfbe1482dab42e4f03b49cf18 (diff)
rtla: Automatically move rtla to a house-keeping cpu
When the user sets -c <cpu-list> try to move rtla out of the <cpu-list>, even without an -H option. This is useful to avoid having rtla interfering with the workload. This works by removing <cpu-list> from rtla's current affinity. If rtla fails to move itself away it is not that of a problem as this is an automatic measure. Link: https://lkml.kernel.org/r/c54304d90c777310fb85a3e658d1449173759aab.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> Signed-off-by: Daniel Bristot de Oliveira <bristot@kernel.org> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Diffstat (limited to 'tools/tracing/rtla/src/timerlat_top.c')
-rw-r--r--tools/tracing/rtla/src/timerlat_top.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/tracing/rtla/src/timerlat_top.c b/tools/tracing/rtla/src/timerlat_top.c
index 920f2f6ef842..f0c6d9735e2a 100644
--- a/tools/tracing/rtla/src/timerlat_top.c
+++ b/tools/tracing/rtla/src/timerlat_top.c
@@ -619,6 +619,15 @@ timerlat_top_apply_config(struct osnoise_tool *top, struct timerlat_top_params *
err_msg("Failed to set rtla to the house keeping CPUs\n");
goto out_err;
}
+ } else if (params->cpus) {
+ /*
+ * Even if the user do not set a house-keeping CPU, try to
+ * move rtla to a CPU set different to the one where the user
+ * set the workload to run.
+ *
+ * No need to check results as this is an automatic attempt.
+ */
+ auto_house_keeping(&params->monitored_cpus);
}
return 0;