diff options
author | Peter Volkov <pva@gentoo.org> | 2008-11-08 19:41:59 +0000 |
---|---|---|
committer | Peter Volkov <pva@gentoo.org> | 2008-11-08 19:41:59 +0000 |
commit | 3cd87c571f63b82e3d99678710b2bb7220071d16 (patch) | |
tree | 742c9a4051ed357cfb509fdf785254a7f74fa777 /sys-cluster/vzctl/files | |
parent | Fix HOMEPAGE, SRC_URI (diff) | |
download | historical-3cd87c571f63b82e3d99678710b2bb7220071d16.tar.gz historical-3cd87c571f63b82e3d99678710b2bb7220071d16.tar.bz2 historical-3cd87c571f63b82e3d99678710b2bb7220071d16.zip |
Patch to fix adjusting of memory limits without VE restart.
Package-Manager: portage-2.2_rc13/cvs/Linux 2.6.26-openvz.git-35f41f1 i686
Diffstat (limited to 'sys-cluster/vzctl/files')
-rw-r--r-- | sys-cluster/vzctl/files/vzctl-3.0.22-adjust-meminfo.patch | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/sys-cluster/vzctl/files/vzctl-3.0.22-adjust-meminfo.patch b/sys-cluster/vzctl/files/vzctl-3.0.22-adjust-meminfo.patch new file mode 100644 index 000000000000..f26a789b6fd9 --- /dev/null +++ b/sys-cluster/vzctl/files/vzctl-3.0.22-adjust-meminfo.patch @@ -0,0 +1,42 @@ +From: Igor Sukhih <igor@openvz.org> +Date: Thu, 30 Oct 2008 13:00:46 +0000 (+0300) +Subject: vzctl: adjust /proc/meminfo when privvmpages or --meminfo changes +X-Git-Tag: vzctl-3.0.23~1 +X-Git-Url: http://git.openvz.org/?p=vzctl;a=commitdiff_plain;h=17705858ad37d34c2caa3f89d3af5bf2ad34073a;hp=372cd4f09f58a62a3dc05152ae288ad2b083a5b2 + +vzctl: adjust /proc/meminfo when privvmpages or --meminfo changes + +Fixes http://bugzilla.openvz.org/623 +--- + +diff --git a/src/lib/meminfo.c b/src/lib/meminfo.c +index 6c686ad..c4102c0 100644 +--- a/src/lib/meminfo.c ++++ b/src/lib/meminfo.c +@@ -51,13 +51,20 @@ int vps_meminfo_set(vps_handler *h, envid_t veid, meminfo_param *gparam, + /* update meminfo on --privvmpages, --meminfo */ + if (param->mode < 0 && privvmpages == NULL) + return 0; +- if (gparam->mode < 0 && vps_p->g_param != NULL) { +- param = &vps_p->g_param->res.meminfo; +- if (param->mode != VE_MEMINFO_PRIVVMPAGES) +- return 0; ++ if (vps_p->g_param != NULL) { ++ if (privvmpages == NULL) ++ /* use privvmpages from VE.conf on --meminfo */ ++ privvmpages = vps_p->g_param->res.ub.privvmpages; ++ ++ if (param->mode < 0) { ++ /* use meminfo from VE.conf on --privvmpages */ ++ param = &vps_p->g_param->res.meminfo; ++ if (param->mode < 0) ++ param = &default_param; ++ if (param->mode != VE_MEMINFO_PRIVVMPAGES) ++ return 0; ++ } + } +- if (privvmpages == NULL && vps_p->g_param != NULL) +- privvmpages = vps_p->g_param->res.ub.privvmpages; + } + if (param->mode < 0) + param = &default_param; |