[Devel] [PATCH RHEL7 COMMIT] vecalls: fix VZCTL_GET_CPU_STAT uptime_jif scale

Konstantin Khorenko khorenko at virtuozzo.com
Thu Oct 8 07:13:47 PDT 2015


The commit is pushed to "branch-rh7-3.10.0-229.7.2.vz7.8.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-229.7.2.vz7.8.4
------>
commit ab4b950007e81f0ea1a07cbba6b06da74a6e7e46
Author: Vladimir Davydov <vdavydov at virtuozzo.com>
Date:   Thu Oct 8 18:13:47 2015 +0400

    vecalls: fix VZCTL_GET_CPU_STAT uptime_jif scale
    
    ve->start_time is in jiffies, therefore we must use
    jiffies_64_to_clock_t helper in order to convert it to clock_t.
    
    https://jira.sw.ru/browse/PSBM-28811
    
    Signed-off-by: Vladimir Davydov <vdavydov at virtuozzo.com>
    Reviewed-by: Kirill Tkhai <ktkhai at odin.com>
---
 kernel/ve/vecalls.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/ve/vecalls.c b/kernel/ve/vecalls.c
index 9e86615..537fc4a 100644
--- a/kernel/ve/vecalls.c
+++ b/kernel/ve/vecalls.c
@@ -128,7 +128,7 @@ static int ve_get_cpu_stat(envid_t veid, struct vz_cpu_stat __user *buf)
 
 	vstat->uptime_clk = ve_get_uptime(ve);
 
-	vstat->uptime_jif = (unsigned long)cputime64_to_clock_t(
+	vstat->uptime_jif = (unsigned long)jiffies_64_to_clock_t(
 				get_jiffies_64() - ve->start_jiffies);
 	for (i = 0; i < 3; i++) {
 		tmp = avenrun[i] + (FIXED_1/200);



More information about the Devel mailing list