Documentation/rtla: Cover default options
Subsystems (4)
Tomas Glozar
maintainercover Documentation/rtla: Cover default options
RTLA has many options that have a default value that is used when the option is not set associated with them. Those are not covered in the documentation for the options, which creates confusion among users.
Document the default behavior for all relevant options: -H, -P, -C, --trace-buffer-size. Some of these are covered in general descriptions, only missing from the option documentation.
Also, fix a few typos and incorrect naming of tracers.
-----------------------
The patchset contains two parts: fixes (first five commits), and new additions for default options, which were previously undocumented or poorly documented (the rest).
The patchset assumes [1] is applied, renaming included files to *.txt from *.rst, to prevent build error on "make htmldocs".
Note: I am aware that there are more issues with the documentation, just not everything can (and should) be fixed in one patchset.
[1] https://lore.kernel.org/linux-trace-kernel/[email protected]/
Tomas Glozar (9):
Documentation/rtla: Fix typo in common_options.txt Documentation/rtla: Fix typo in common_timerlat_options.txt Documentation/rtla: Fix typo in rtla-timerlat-top.rst Documentation/rtla: Fix typo in common_timerlat_options.txt Documentation/rtla: Correct tracer name for common options Documentation/rtla: Mention default priority Documentation/rtla: Mention default cgroup state Documentation/trace: Specify exact priority for timerlat Documentation/rtla: Include defaults for tracer options
Documentation/tools/rtla/common_options.txt | 16 +++++++++++++--- .../tools/rtla/common_timerlat_options.txt | 4 ++-- Documentation/tools/rtla/rtla-timerlat-top.rst | 2 +- Documentation/trace/timerlat-tracer.rst | 12 ++++++------ 4 files changed, 22 insertions(+), 12 deletions(-)
Signature · 1 line
2.51.0
Tomas Glozar
maintainerPATCH 1/9 Documentation/rtla: Fix typo in common_options.txt
Fix "unlike" being spelled "nlike" in --on-threshold documentation.
--- Documentation/tools/rtla/common_options.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/tools/rtla/common_options.txt +1 -1
@@ -67,7 +67,7 @@ - *trace[,file=<filename>]* Saves trace output, optionally taking a filename. Alternative to -t/--trace. - Note that nlike -t/--trace, specifying this multiple times will result in + Note that unlike -t/--trace, specifying this multiple times will result in the trace being saved multiple times. - *signal,num=<sig>,pid=<pid>*
Signature · 1 line
2.51.0
Tomas Glozar
maintainerPATCH 2/9 Documentation/rtla: Fix typo in common_timerlat_options.txt
In reply to Tomas GlozarFix "awakes" being used in place of "awakened" in --users-threads option documentation.
--- Documentation/tools/rtla/common_timerlat_options.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/tools/rtla/common_timerlat_options.txt +1 -1
@@ -56,7 +56,7 @@ **-u**, **--user-threads** Set timerlat to run without a workload, and then dispatches user-space workloads - to wait on the timerlat_fd. Once the workload is awakes, it goes to sleep again + to wait on the timerlat_fd. Once the workload is awakened, it goes to sleep again adding so the measurement for the kernel-to-user and user-to-kernel to the tracer output. **--user-threads** will be used unless the user specify **-k**.
Signature · 1 line
2.51.0
Tomas Glozar
maintainerPATCH 3/9 Documentation/rtla: Fix typo in rtla-timerlat-top.rst
In reply to Tomas GlozarFix "seem" in place of intended "seen" in rtla-timerlat-top documentation.
--- Documentation/tools/rtla/rtla-timerlat-top.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/tools/rtla/rtla-timerlat-top.rst +1 -1
@@ -21,7 +21,7 @@ DESCRIPTION The **rtla timerlat top** displays a summary of the periodic output from the *timerlat* tracer. It also provides information for each operating system noise via the **osnoise:** tracepoints that can be -seem with the option **-T**. +seen with the option **-T**. OPTIONS =======
Signature · 1 line
2.51.0
Tomas Glozar
maintainerPATCH 4/9 Documentation/rtla: Fix typo in common_timerlat_options.txt
In reply to Tomas GlozarFix spelling error "equilavent" in place of "equivalent".
--- Documentation/tools/rtla/common_timerlat_options.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/tools/rtla/common_timerlat_options.txt +1 -1
@@ -13,7 +13,7 @@ Set the automatic trace mode. This mode sets some commonly used options while debugging the system. It is equivalent to use **-T** *us* **-s** *us* **-t**. By default, *timerlat* tracer uses FIFO:95 for *timerlat* threads, - thus equilavent to **-P** *f:95*. + thus equivalent to **-P** *f:95*. **-p**, **--period** *us*
Signature · 1 line
2.51.0
Tomas Glozar
maintainerPATCH 5/9 Documentation/rtla: Correct tracer name for common options
In reply to Tomas GlozarSeveral options in common_options.rst say "osnoise tracer" for both osnoise and timerlat.
Use |tool| variable so that the correct tool name is used.
--- Documentation/tools/rtla/common_options.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Documentation/tools/rtla/common_options.txt +2 -2
@@ -1,6 +1,6 @@ **-c**, **--cpus** *cpu-list* - Set the osnoise tracer to run the sample threads in the cpu-list. + Set the |tool| tracer to run the sample threads in the cpu-list. **-H**, **--house-keeping** *cpu-list*
@@ -35,7 +35,7 @@ **-P**, **--priority** *o:prio|r:prio|f:prio|d:runtime:period* - Set scheduling parameters to the osnoise tracer threads, the format to set the priority are: + Set scheduling parameters to the |tool| tracer threads, the format to set the priority are: - *o:prio* - use SCHED_OTHER with *prio*; - *r:prio* - use SCHED_RR with *prio*;
Signature · 1 line
2.51.0
Tomas Glozar
maintainerPATCH 6/9 Documentation/rtla: Mention default priority
In reply to Tomas GlozarRTLA allows the priority of workload threads to be set using the -P option. This is covered in docs, but the default state for RTLA's own user workload (implemented in timerlat_u.c) is not mentioned.
Add mention of the default user workload priority as well as a reference to osnoise and timerlat tracers for kernel workload priority.
--- Documentation/tools/rtla/common_options.txt | 2 ++ 1 file changed, 2 insertions(+)
Documentation/tools/rtla/common_options.txt +2 -0
@@ -42,6 +42,8 @@ - *f:prio* - use SCHED_FIFO with *prio*; - *d:runtime[us|ms|s]:period[us|ms|s]* - use SCHED_DEADLINE with *runtime* and *period* in nanoseconds. + If not set, tracer threads keep their default priority. For rtla user threads, it is set to SCHED_FIFO with priority 95. For kernel threads, see *osnoise* and *timerlat* tracer documentation for the running kernel version. + **-C**, **--cgroup**\[*=cgroup*] Set a *cgroup* to the tracer's threads. If the **-C** option is passed without arguments, the tracer's thread will inherit **rtla**'s *cgroup*. Otherwise, the threads will be placed on the *cgroup* passed to the option.
Signature · 1 line
2.51.0
Tomas Glozar
maintainerPATCH 7/9 Documentation/rtla: Mention default cgroup state
In reply to Tomas GlozarThe RTLA option -C/--cgroup is used to set a cgroup for workload threads. This is either a specific cgroup, if passed an argument, or rtla's cgroup, if no argument is given.
Expand the documentation of the -C option to also include the information about the cgroup settings when the option is not specified.
--- Documentation/tools/rtla/common_options.txt | 2 ++ 1 file changed, 2 insertions(+)
Documentation/tools/rtla/common_options.txt +2 -0
@@ -48,6 +48,8 @@ Set a *cgroup* to the tracer's threads. If the **-C** option is passed without arguments, the tracer's thread will inherit **rtla**'s *cgroup*. Otherwise, the threads will be placed on the *cgroup* passed to the option. + If not set, the behavior differs between workload types. User workloads created by rtla will inherit rtla's cgroup. Kernel workloads are assigned the root cgroup. + **--warm-up** *s* After starting the workload, let it run for *s* seconds before starting collecting the data, allowing the system to warm-up. Statistical data generated during warm-up is discarded.
Signature · 1 line
2.51.0
Tomas Glozar
maintainerPATCH 8/9 Documentation/trace: Specify exact priority for timerlat
In reply to Tomas GlozarThe timerlat tracer documentation mentions that threads are created with real-time priority, but does not mention which priority and scheduling class is used.
Add the information so that users do not have to look it up in trace_osnoise.c.
--- Documentation/trace/timerlat-tracer.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
Documentation/trace/timerlat-tracer.rst +6 -6
@@ -43,12 +43,12 @@ It is possible to follow the trace by reading the trace file:: <...>-868 [001] .... 54.030347: #2 context thread timer_latency 4351 ns -The tracer creates a per-cpu kernel thread with real-time priority that -prints two lines at every activation. The first is the *timer latency* -observed at the *hardirq* context before the activation of the thread. -The second is the *timer latency* observed by the thread. The ACTIVATION -ID field serves to relate the *irq* execution to its respective *thread* -execution. +The tracer creates a per-cpu kernel thread with real-time priority +SCHED_FIFO:95 that prints two lines at every activation. The first is +the *timer latency* observed at the *hardirq* context before the activation +of the thread. The second is the *timer latency* observed by the thread. +The ACTIVATION ID field serves to relate the *irq* execution to its +respective *thread* execution. The *irq*/*thread* splitting is important to clarify in which context the unexpected high value is coming from. The *irq* context can be
Signature · 1 line
2.51.0
Tomas Glozar
maintainerPATCH 9/9 Documentation/rtla: Include defaults for tracer options
In reply to Tomas GlozarCommit 0122938a7ab4 ("rtla: Always set all tracer options") changed the behavior of RTLA to always set all osnoise and timerlat tracer options to default values taken from the tracers whenever an RTLA measurement is started. The change was done to make RTLA results consistent on subsequent runs of the same command.
Include the default values for tracer options also in documentation where appropriate.
--- Documentation/tools/rtla/common_options.txt | 6 ++++++ 1 file changed, 6 insertions(+)
Documentation/tools/rtla/common_options.txt +6 -0
@@ -2,10 +2,14 @@ Set the |tool| tracer to run the sample threads in the cpu-list. + By default, the |tool| tracer runs the sample threads on all CPUs. + **-H**, **--house-keeping** *cpu-list* Run rtla control threads only on the given cpu-list. + If omitted, rtla will attempt to auto-migrate its main thread to any CPU that is not running any workload threads. + **-d**, **--duration** *time[s|m|h|d]* Set the duration of the session.
@@ -57,6 +61,8 @@ **--trace-buffer-size** *kB* Set the per-cpu trace buffer size in kB for the tracing output. + If not set, the default tracefs buffer size is used. + **--on-threshold** *action* Defines an action to be executed when tracing is stopped on a latency threshold
Signature · 1 line
2.51.0
Jonathan Corbet
maintainerQuoted 9 lines · Tomas Glozar
RTLA has many options that have a default value that is used when the option is not set associated with them. Those are not covered in the documentation for the options, which creates confusion among users.
Document the default behavior for all relevant options: -H, -P, -C, --trace-buffer-size. Some of these are covered in general descriptions, only missing from the option documentation.
Also, fix a few typos and incorrect naming of tracers.
So I see that this series is still unapplied...should I take it through docs?
Thanks,
jon
Quoted 6 lines · On Mon, 03 Nov 2025 16:35:32 -0700 Jonathan Corbet <[email protected]> wrote:
Quoted 4 lines · Tomas Glozar
RTLA has many options that have a default value that is used when the option is not set associated with them. Those are not covered in the documentation for the options, which creates confusion among users.
Quoted 8 lines
Quoted 5 lines
Document the default behavior for all relevant options: -H, -P, -C, --trace-buffer-size. Some of these are covered in general descriptions, only missing from the option documentation.
Also, fix a few typos and incorrect naming of tracers.
So I see that this series is still unapplied...should I take it through docs?
Yes please!
Thanks,
-- Steve
Jonathan Corbet
maintainerQuoted 13 lines · Steven Rostedt
Quoted 10 lines · On Mon, 03 Nov 2025 16:35:32 -0700 Jonathan Corbet <[email protected]> wrote:
Quoted 8 lines · Tomas Glozar
RTLA has many options that have a default value that is used when the option is not set associated with them. Those are not covered in the documentation for the options, which creates confusion among users.
Document the default behavior for all relevant options: -H, -P, -C, --trace-buffer-size. Some of these are covered in general descriptions, only missing from the option documentation.
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
Also, fix a few typos and incorrect naming of tracers.
So I see that this series is still unapplied...should I take it through docs?
Yes please!
OK, I have done that.
Thanks,
jon
Bagas Sanjaya
Acked-byQuoted 6 lines · Jonathan Corbet
Quoted 4 lines · Tomas Glozar
RTLA has many options that have a default value that is used when the option is not set associated with them. Those are not covered in the documentation for the options, which creates confusion among users.
Quoted 8 lines
Quoted 5 lines
Document the default behavior for all relevant options: -H, -P, -C, --trace-buffer-size. Some of these are covered in general descriptions, only missing from the option documentation.
Also, fix a few typos and incorrect naming of tracers.
So I see that this series is still unapplied...should I take it through docs?
Of course!
Signature · 1 line
An old man doll... just what I always wanted! - Clara