diff -NurpP --minimal linux-4.9.76-vs2.3.9.5/fs/proc/stat.c linux-4.9.76-vs2.3.9.5.2/fs/proc/stat.c
--- linux-4.9.76-vs2.3.9.5/fs/proc/stat.c	2018-01-13 01:47:09.000000000 +0000
+++ linux-4.9.76-vs2.3.9.5.2/fs/proc/stat.c	2018-01-16 00:55:05.000000000 +0000
@@ -97,7 +97,7 @@ static int show_stat(struct seq_file *p,
 	getboottime64(&boottime);
 
 	if (vx_flags(VXF_VIRT_UPTIME, 0))
-		vx_vsi_boottime(&boottime);
+		vx_vsi_boottime64(&boottime);
 
 	if (virt_cpu)
 		cpuset_cpus_allowed(current, cpus_allowed);
diff -NurpP --minimal linux-4.9.76-vs2.3.9.5/include/linux/memcontrol.h linux-4.9.76-vs2.3.9.5.2/include/linux/memcontrol.h
--- linux-4.9.76-vs2.3.9.5/include/linux/memcontrol.h	2018-01-10 02:50:49.000000000 +0000
+++ linux-4.9.76-vs2.3.9.5.2/include/linux/memcontrol.h	2018-01-24 22:26:58.000000000 +0000
@@ -403,10 +403,10 @@ static inline bool mem_cgroup_is_descend
 	return cgroup_is_descendant(memcg->css.cgroup, root->css.cgroup);
 }
 
-extern u64 mem_cgroup_mem_usage_pages(struct mem_cgroup *memcg);
-extern u64 mem_cgroup_mem_limit_pages(struct mem_cgroup *memcg);
-extern u64 mem_cgroup_memsw_usage_pages(struct mem_cgroup *memcg);
-extern u64 mem_cgroup_memsw_limit_pages(struct mem_cgroup *memcg);
+extern unsigned long mem_cgroup_mem_usage_pages(struct mem_cgroup *memcg);
+extern unsigned long mem_cgroup_mem_limit_pages(struct mem_cgroup *memcg);
+extern unsigned long mem_cgroup_memsw_usage_pages(struct mem_cgroup *memcg);
+extern unsigned long mem_cgroup_memsw_limit_pages(struct mem_cgroup *memcg);
 
 static inline bool mm_match_cgroup(struct mm_struct *mm,
 				   struct mem_cgroup *memcg)
diff -NurpP --minimal linux-4.9.76-vs2.3.9.5/kernel/vserver/limit.c linux-4.9.76-vs2.3.9.5.2/kernel/vserver/limit.c
--- linux-4.9.76-vs2.3.9.5/kernel/vserver/limit.c	2018-01-10 02:50:49.000000000 +0000
+++ linux-4.9.76-vs2.3.9.5.2/kernel/vserver/limit.c	2018-01-24 23:45:57.000000000 +0000
@@ -259,7 +259,9 @@ int vc_rlimit_stat(struct vx_info *vxi,
 void vx_vsi_meminfo(struct sysinfo *val)
 {
 	struct mem_cgroup *mcg;
-	u64 res_limit, res_usage;
+	unsigned long res_limit, res_usage;
+	unsigned shift;
+
 
 	rcu_read_lock();
 	mcg = mem_cgroup_from_task(current);
@@ -269,10 +271,11 @@ void vx_vsi_meminfo(struct sysinfo *val)
 
 	res_limit = mem_cgroup_mem_limit_pages(mcg);
 	res_usage = mem_cgroup_mem_usage_pages(mcg);
+	shift = val->mem_unit == 1 ? PAGE_SHIFT : 0;
 
 	if (res_limit != PAGE_COUNTER_MAX)
-		val->totalram = res_limit;
-	val->freeram = val->totalram - res_usage;
+		val->totalram = res_limit << shift;
+	val->freeram = val->totalram - (res_usage << shift);
 	val->bufferram = 0;
 	val->totalhigh = 0;
 	val->freehigh = 0;
@@ -284,8 +287,9 @@ void vx_vsi_swapinfo(struct sysinfo *val
 {
 #ifdef	CONFIG_MEMCG_SWAP
 	struct mem_cgroup *mcg;
-	u64 res_limit, res_usage, memsw_limit, memsw_usage;
-	s64 swap_limit, swap_usage;
+	unsigned long res_limit, res_usage, memsw_limit, memsw_usage;
+	signed long swap_limit, swap_usage;
+	unsigned shift;
 
 	rcu_read_lock();
 	mcg = mem_cgroup_from_task(current);
@@ -294,18 +298,20 @@ void vx_vsi_swapinfo(struct sysinfo *val
 		goto out;
 
 	res_limit = mem_cgroup_mem_limit_pages(mcg);
-	res_usage = mem_cgroup_mem_usage_pages(mcg);
-	memsw_limit = mem_cgroup_memsw_limit_pages(mcg);
-	memsw_usage = mem_cgroup_memsw_usage_pages(mcg);
 
 	/* memory unlimited */
 	if (res_limit == PAGE_COUNTER_MAX)
 		goto out;
 
+	res_usage = mem_cgroup_mem_usage_pages(mcg);
+	memsw_limit = mem_cgroup_memsw_limit_pages(mcg);
+	memsw_usage = mem_cgroup_memsw_usage_pages(mcg);
+	shift = val->mem_unit == 1 ? PAGE_SHIFT : 0;
+
 	swap_limit = memsw_limit - res_limit;
 	/* we have a swap limit? */
 	if (memsw_limit != PAGE_COUNTER_MAX)
-		val->totalswap = swap_limit;
+		val->totalswap = swap_limit << shift;
 
 	/* calculate swap part */
 	swap_usage = (memsw_usage > res_usage) ?
@@ -313,7 +319,7 @@ void vx_vsi_swapinfo(struct sysinfo *val
 
 	/* total shown minus usage gives free swap */
 	val->freeswap = (swap_usage < swap_limit) ?
-		val->totalswap - swap_usage : 0;
+		val->totalswap - (swap_usage << shift) : 0;
 out:
 #else	/* !CONFIG_MEMCG_SWAP */
 	val->totalswap = 0;
diff -NurpP --minimal linux-4.9.76-vs2.3.9.5/mm/memcontrol.c linux-4.9.76-vs2.3.9.5.2/mm/memcontrol.c
--- linux-4.9.76-vs2.3.9.5/mm/memcontrol.c	2018-01-10 08:42:06.000000000 +0000
+++ linux-4.9.76-vs2.3.9.5.2/mm/memcontrol.c	2018-01-24 23:33:09.000000000 +0000
@@ -2825,24 +2825,24 @@ static u64 mem_cgroup_read_u64(struct cg
 	}
 }
 
-u64 mem_cgroup_mem_usage_pages(struct mem_cgroup *memcg)
+unsigned long mem_cgroup_mem_usage_pages(struct mem_cgroup *memcg)
 {
-	return mem_cgroup_usage(memcg, false) >> PAGE_SHIFT;
+	return mem_cgroup_usage(memcg, false);
 }
 
-u64 mem_cgroup_mem_limit_pages(struct mem_cgroup *memcg)
+unsigned long mem_cgroup_mem_limit_pages(struct mem_cgroup *memcg)
 {
-	return (u64)memcg->memory.limit;
+	return memcg->memory.limit;
 }
 
-u64 mem_cgroup_memsw_usage_pages(struct mem_cgroup *memcg)
+unsigned long mem_cgroup_memsw_usage_pages(struct mem_cgroup *memcg)
 {
-	return mem_cgroup_usage(memcg, true) >> PAGE_SHIFT;
+	return mem_cgroup_usage(memcg, true);
 }
 
-u64 mem_cgroup_memsw_limit_pages(struct mem_cgroup *memcg)
+unsigned long mem_cgroup_memsw_limit_pages(struct mem_cgroup *memcg)
 {
-	return (u64)memcg->memsw.limit;
+	return memcg->memsw.limit;
 }
 
 #ifndef CONFIG_SLOB
