[Devel] [PATCH RHEL8 COMMIT] vzstat: account cpu total time properly in mm performance stats

Konstantin Khorenko khorenko at virtuozzo.com
Tue Jun 1 20:29:49 MSK 2021


The commit is pushed to "branch-rh8-4.18.0-240.1.1.vz8.5.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh8-4.18.0-240.1.1.vz8.5.34
------>
commit c0e54c2975745f325376285b6457734863995f01
Author: Konstantin Khorenko <khorenko at virtuozzo.com>
Date:   Tue Jun 1 20:29:49 2021 +0300

    vzstat: account cpu total time properly in mm performance stats
    
    /proc/vz/mmperf occasionally accounts/shows wall total time in both
    "Wall_tot_time" and "CPU_tot_time" columns, fix this.
    
    Fixes: c0a20dd32be6 ("vzstat: Add vzstat module and kstat interfaces")
    https://pmc.acronis.com/browse/VSTOR-16659
    
    Signed-off-by: Konstantin Khorenko <khorenko at virtuozzo.com>
    
    (cherry-picked from vz7 commit 306162b35d01 ("vzstat: account cpu total time
    properly in mm performance stats"))
    Signed-off-by: Andrey Zhadchenko <andrey.zhadchenko at virtuozzo.com>
---
 kernel/ve/vzstat_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/ve/vzstat_core.c b/kernel/ve/vzstat_core.c
index 7f8d34688e61..f18767d64f6d 100644
--- a/kernel/ve/vzstat_core.c
+++ b/kernel/ve/vzstat_core.c
@@ -20,7 +20,7 @@ void KSTAT_PERF_ADD(struct kstat_perf_pcpu_struct *ptr, u64 real_time, u64 cpu_t
 	cur->wall_tottime += real_time;
 	if (cur->cpu_maxdur < cpu_time)
 		cur->cpu_maxdur = cpu_time;
-	cur->cpu_tottime += real_time;
+	cur->cpu_tottime += cpu_time;
 	write_seqcount_end(&cur->lock);
 	put_cpu_ptr(cur);
 }


More information about the Devel mailing list