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

Konstantin Khorenko khorenko at virtuozzo.com
Wed Oct 11 13:57:52 MSK 2017


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);
 	}
-- 
1.8.3.1



More information about the Devel mailing list