[RHEL7,COMMIT] vzstat: account cpu total time properly in mm performance stats

Submitted by Konstantin Khorenko on Nov. 15, 2018, 9:29 a.m.

Details

Message ID 201811150929.wAF9TrbB006215@finist-ce7.sw.ru
State New
Series "Series without cover letter"
Headers show

Commit Message

Konstantin Khorenko Nov. 15, 2018, 9:29 a.m.
The commit is pushed to "branch-rh7-3.10.0-862.20.2.vz7.73.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-862.20.2.vz7.73.5
------>
commit 306162b35d018f97e3b175d6bb98a4d2632cf303
Author: Konstantin Khorenko <khorenko@virtuozzo.com>
Date:   Mon Nov 12 15:20:28 2018 +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: a258c15f2c33 ("vzstat: initial patch")
    https://pmc.acronis.com/browse/VSTOR-16659
    
    Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com>
---
 kernel/ve/vzstat_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/kernel/ve/vzstat_core.c b/kernel/ve/vzstat_core.c
index 0e292c5103eb..b1a9144cd5bf 100644
--- a/kernel/ve/vzstat_core.c
+++ b/kernel/ve/vzstat_core.c
@@ -19,7 +19,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);
 }