On 28.09.2015 12:46, Vladimir Davydov wrote: > 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 <[email protected]> > --- > 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 9e866153cc2d..537fc4aa964b 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); >
Reviewed-by: Kirill Tkhai <[email protected]> N.B. 2.6.32 does not need that, because cputime is in jiffies there. _______________________________________________ Devel mailing list [email protected] https://lists.openvz.org/mailman/listinfo/devel
