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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <hucool.lihua@xxxxxxxxxx>
---
 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




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux