doc: fix the descriptions of the log_prio option
authorShin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Thu, 29 Aug 2024 08:58:23 +0000 (17:58 +0900)
committerVincent Fu <vincent.fu@samsung.com>
Wed, 4 Sep 2024 17:59:45 +0000 (13:59 -0400)
Commit 03ec570f6e57 ("fio: Introduce the log_prio option") added the
description of the log_prio option to fio.1. However, the description
was wrong. It mentioned that the log_prio option would change the number
of fields in the Log File Format, but actually it does not do so. Fix
the description.

Also, the commit did not update HOWTO.rst for the log_prio option. To
keep HOWTO.rst same as fio.1, add the missing descriptions to HOWTO.rst.

Fixes: 03ec570f6e57 ("fio: Introduce the log_prio option")
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Link: https://lore.kernel.org/r/20240829085826.999859-7-shinichiro.kawasaki@wdc.com
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
HOWTO.rst
fio.1

index 4ef7a41da4b06e10a04499a6bee6dc45c17d0f8c..93116879c327ee1a0bd3527be368af488d9fc63d 100644 (file)
--- a/HOWTO.rst
+++ b/HOWTO.rst
@@ -4223,6 +4223,13 @@ Measurements and reporting
        entry as well as the other data values. Defaults to 0 meaning that
        offsets are not present in logs. Also see `Log File Formats`_.
 
+.. option:: log_prio=bool
+
+       If this is set, the *Command priority* field in `Log File Formats`_
+       shows the priority value and the IO priority class of the command.
+       Otherwise, the field shows if the command has the highest RT
+       priority class or not. Also see `Log File Formats`_.
+
 .. option:: log_compression=int
 
        If this is set, fio will compress the I/O logs as it goes, to keep the
@@ -5213,8 +5220,16 @@ The entry's *block size* is always in bytes. The *offset* is the position in byt
 from the start of the file for that particular I/O. The logging of the offset can be
 toggled with :option:`log_offset`.
 
-*Command priority* is 0 for normal priority and 1 for high priority. This is controlled
-by the ioengine specific :option:`cmdprio_percentage`.
+If :option:`log_prio` is not set, the entry's *Command priority* is 1 for an IO
+executed with the highest RT priority class (:option:`prioclass` =1 or
+:option:`cmdprio_class` =1) and 0 otherwise. This is controlled by the
+:option:`prioclass` option and the ioengine specific
+:option:`cmdprio_percentage`  :option:`cmdprio_class` options. If
+:option:`log_prio` is set, the entry's *Command priority* is the priority set
+for the IO, as a 16-bits hexadecimal number with the lowest 13 bits indicating
+the priority value (:option:`prio` and :option:`cmdprio` options) and the
+highest 3 bits indicating the IO priority class (:option:`prioclass` and
+:option:`cmdprio_class` options).
 
 Fio defaults to logging every individual I/O but when windowed logging is set
 through :option:`log_avg_msec`, either the average (by default), the maximum
diff --git a/fio.1 b/fio.1
index 1953aea11830e01666ecb3658bdeba3fe3a01412..2fade021a14994c0790263460639da864e7abcda 100644 (file)
--- a/fio.1
+++ b/fio.1
@@ -3933,9 +3933,10 @@ entry as well as the other data values. Defaults to 0 meaning that
 offsets are not present in logs. Also see \fBLOG FILE FORMATS\fR section.
 .TP
 .BI log_prio \fR=\fPbool
-If this is set, the iolog options will include the I/O priority for the I/O
-entry as well as the other data values. Defaults to 0 meaning that
-I/O priorities are not present in logs. Also see \fBLOG FILE FORMATS\fR section.
+If this is set, the `Command priority` field in \fBLOG FILE FORMATS\fR
+shows the priority value and the IO priority class of the command.
+Otherwise, the field shows if the command has the highest RT priority
+class or not. Also see \fBLOG FILE FORMATS\fR section.
 .TP
 .BI log_compression \fR=\fPint
 If this is set, fio will compress the I/O logs as it goes, to keep the