[Devel] [PATCH rh8 1/3] vecalls: Add cpu stat measurement units comments to header

Konstantin Khorenko khorenko at virtuozzo.com
Tue Nov 10 12:44:53 MSK 2020


It's not obvious why, say, "user_jif" field does not contain
time in jiffies, so add clarification comments.

Fixes: 248ed6b2a193 ("ve: Add vecalls")

Signed-off-by: Konstantin Khorenko <khorenko at virtuozzo.com>
---
 include/uapi/linux/vzcalluser.h | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/include/uapi/linux/vzcalluser.h b/include/uapi/linux/vzcalluser.h
index f2584b4b284f..8a4ff0015e40 100644
--- a/include/uapi/linux/vzcalluser.h
+++ b/include/uapi/linux/vzcalluser.h
@@ -55,13 +55,13 @@ struct vz_load_avg {
 };
 
 struct vz_cpu_stat {
-	unsigned long			user_jif;
-	unsigned long			nice_jif;
-	unsigned long			system_jif;
-	unsigned long			uptime_jif;
-	__u64				idle_clk;
-	__u64				strv_clk;
-	__u64				uptime_clk;
+	unsigned long			user_jif;	/* clock_t */
+	unsigned long			nice_jif;	/* clock_t */
+	unsigned long			system_jif	/* clock_t */;
+	unsigned long			uptime_jif	/* clock_t */;
+	__u64				idle_clk;	/* ns */
+	__u64				strv_clk;	/* deprecated */
+	__u64				uptime_clk;	/* ns */
 	struct vz_load_avg		avenrun[3];	/* loadavg data */
 };
 
-- 
2.28.0



More information about the Devel mailing list