diff options
| author | 2022-04-15 11:36:18 +0800 | |
|---|---|---|
| committer | 2022-04-16 02:54:32 -0600 | |
| commit | 6c757e9f55f02fbc226823f8d441cd03cc282109 (patch) | |
| tree | 10e295893d738b7141e795cfc949882c7f03998d | |
| parent | docs/admin: alphabetize parts of kernel-parameters.txt (part 2) (diff) | |
docs/scheduler: fix unit error
The unit mentioned in the documentation of scheduler statistics is
outdated which may mislead the readers.
The unit of statistics that is reported by /proc/schedstat is modified
to nanosecond, and the unit of statistics that is reported by
/proc/PID/schedstat is provided as well to make the context consistent.
The rq_cpu_time and the rq_sched_info.run_delay of a run queue, and the
sched_info.run_delay of a task are all updated based on the clock of the
run queue, while the se.sum_exec_runtime of a task is updated based on
the clock_task of the run queue of the task. Both the clock and
clock_task are relied on the return value of the function sched_clock()
which is in the unit of nanosecond.
Signed-off-by: Jui-Tse Huang <juitse.huang@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
| -rw-r--r-- | Documentation/scheduler/sched-stats.rst | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Documentation/scheduler/sched-stats.rst b/Documentation/scheduler/sched-stats.rst index 9078a27a4137..03c062915998 100644 --- a/Documentation/scheduler/sched-stats.rst +++ b/Documentation/scheduler/sched-stats.rst @@ -155,8 +155,8 @@ schedstats also adds a new /proc/<pid>/schedstat file to include some of the same information on a per-process level. There are three fields in this file correlating for that process to: - 1) time spent on the cpu - 2) time spent waiting on a runqueue + 1) time spent on the cpu (in nanoseconds) + 2) time spent waiting on a runqueue (in nanoseconds) 3) # of timeslices run on this cpu A program could be easily written to make use of these extra fields to |
