Skip to content

Commit fcbc60d

Browse files
lenticularis39rostedt
authored andcommitted
rtla/timerlat: Do not set params->user_workload with -U
Since commit fb9e90a ("rtla/timerlat: Make user-space threads the default"), rtla-timerlat has been defaulting to params->user_workload if neither that or params->kernel_workload is set. This has unintentionally made -U, which sets only params->user_hist/top but not params->user_workload, to behave like -u unless -k is set, preventing the user from running a custom workload. Example: $ rtla timerlat hist -U -c 0 & [1] 7413 $ python sample/timerlat_load.py 0 Error opening timerlat fd, did you run timerlat -U? $ ps | grep timerlatu 7415 pts/4 00:00:00 timerlatu/0 Fix the issue by checking for params->user_top/hist instead of params->user_workload when setting default thread mode. Link: https://lore.kernel.org/20241021123140.14652-1-tglozar@redhat.com Fixes: fb9e90a ("rtla/timerlat: Make user-space threads the default") Signed-off-by: Tomas Glozar <tglozar@redhat.com> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
1 parent 1321648 commit fcbc60d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tools/tracing/rtla/src/timerlat_hist.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1073,7 +1073,7 @@ timerlat_hist_apply_config(struct osnoise_tool *tool, struct timerlat_hist_param
10731073
* If the user did not specify a type of thread, try user-threads first.
10741074
* Fall back to kernel threads otherwise.
10751075
*/
1076-
if (!params->kernel_workload && !params->user_workload) {
1076+
if (!params->kernel_workload && !params->user_hist) {
10771077
retval = tracefs_file_exists(NULL, "osnoise/per_cpu/cpu0/timerlat_fd");
10781078
if (retval) {
10791079
debug_msg("User-space interface detected, setting user-threads\n");

tools/tracing/rtla/src/timerlat_top.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -839,7 +839,7 @@ timerlat_top_apply_config(struct osnoise_tool *top, struct timerlat_top_params *
839839
* If the user did not specify a type of thread, try user-threads first.
840840
* Fall back to kernel threads otherwise.
841841
*/
842-
if (!params->kernel_workload && !params->user_workload) {
842+
if (!params->kernel_workload && !params->user_top) {
843843
retval = tracefs_file_exists(NULL, "osnoise/per_cpu/cpu0/timerlat_fd");
844844
if (retval) {
845845
debug_msg("User-space interface detected, setting user-threads\n");

0 commit comments

Comments
 (0)