DORMANTno replies

[PATCH -next] Documentation/filesystems/proc.rst: Change the document about cputime

From: Li Hua <hidden>
Date: 2022-08-01 08:34:32
Also in: linux-fsdevel, lkml
Subsystem: documentation, proc filesystem, the rest · Maintainers: Jonathan Corbet, Linus Torvalds

Because the values of utime, stime, and delta are temporarily
written to cpustat in kcpustat_cpu_fetch_vtime. Therefore, there are two
problems read from /proc/stat:
1. The value read the second time may be less than the first time.
2. When there are many tasks, the statistics are not imprecise when utime
and stime do not exceed one tick.

Signed-off-by: Li Hua <redacted>
---
 Documentation/filesystems/proc.rst | 4 ++++
 1 file changed, 4 insertions(+)
diff --git a/Documentation/filesystems/proc.rst b/Documentation/filesystems/proc.rst
index 47e95dbc820d..b6625e83c994 100644
--- a/Documentation/filesystems/proc.rst
+++ b/Documentation/filesystems/proc.rst
@@ -1459,6 +1459,10 @@ second).  The meanings of the columns are as follows, from left to right:
 - user: normal processes executing in user mode
 - nice: niced processes executing in user mode
 - system: processes executing in kernel mode
+  The amount of time reading from /proc/stat is not reliable, because the value
+  of utime, stime, and delta are temporarily written to cpustat in
+  kcpustat_cpu_fetch_vtime().
+
 - idle: twiddling thumbs
 - iowait: In a word, iowait stands for waiting for I/O to complete. But there
   are several problems:
-- 
2.17.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help