[Devel] [PATCH RHEL7 COMMIT] ve/sched: fix Containers loadavg calculation provided via KSTAT ioctl

Konstantin Khorenko khorenko at virtuozzo.com
Wed Oct 11 13:58:41 MSK 2017


The commit is pushed to "branch-rh7-3.10.0-693.1.1.vz7.37.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-693.1.1.vz7.37.11
------>
commit 072cf62cb3c60679f58139766e7ca084e6db3be4
Author: Konstantin Khorenko <khorenko at virtuozzo.com>
Date:   Wed Oct 11 11:39:22 2017 +0300

    ve/sched: fix Containers loadavg calculation provided via KSTAT ioctl
    
    After cleanup ioctl(VZCTL_GET_CPU_STAT) returns loadavg of host
    for any Container due to lost variable rename.
    This that.
    
    Fixes 36839b0 ("ve/sched: Make functions parameters differ from global variable
    name")
    
    https://jira.sw.ru/browse/PSBM-74490
    
    Signed-off-by: Konstantin Khorenko <khorenko at virtuozzo.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 346541e..9800d3e 100644
--- a/kernel/ve/vecalls.c
+++ b/kernel/ve/vecalls.c
@@ -82,7 +82,7 @@ static int fill_cpu_stat(envid_t veid, struct vz_cpu_stat __user *buf)
 	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);
+		tmp = avnrun[i] + (FIXED_1/200);
 		vstat->avenrun[i].val_int = LOAD_INT(tmp);
 		vstat->avenrun[i].val_frac = LOAD_FRAC(tmp);
 	}


More information about the Devel mailing list