lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Tue, 2 Aug 2022 06:30:46 +0800
From:   Li Hua <hucool.lihua@...wei.com>
To:     <akpm@...ux-foundation.org>, <mail@...istoph.anton.mitterer.name>,
        <hannes@...xchg.org>, <kaleshsingh@...gle.com>,
        <shy828301@...il.com>, <rppt@...nel.org>,
        <paul.gortmaker@...driver.co>
CC:     <linux-kernel@...r.kernel.org>, <linux-fsdevel@...r.kernel.org>,
        <linux-doc@...r.kernel.org>
Subject: [PATCH -next] Documentation/filesystems/proc.rst: Change the document about cputime

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@...wei.com>
---
 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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ