set maxmem bugfix
PATCH 1/1 set maxmem bugfix
Recently some people complain that they cannot set the maxmem for domU. The problem is that some code wrongly treat dom.max_memkb as in byte unit, instead of KB unit. This patch fixs the problem.
$ diffstat maxmem.patch xc_domain.c | 2 +- xc_linux_save.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
tools/libxc/xc_domain.c +1 -1
@@ -107,7 +107,7 @@ info->ssidref = op.u.getdomaininfo.ssidref; info->nr_pages = op.u.getdomaininfo.tot_pages; - info->max_memkb = op.u.getdomaininfo.max_pages<<(PAGE_SHIFT ); + info->max_memkb = op.u.getdomaininfo.max_pages<<(PAGE_SHIFT -10 ); info->shared_info_frame = op.u.getdomaininfo.shared_info_frame; info->cpu_time = op.u.getdomaininfo.cpu_time; info->vcpus = op.u.getdomaininfo.n_vcpu;
tools/libxc/xc_linux_save.c +1 -1
@@ -464,7 +464,7 @@ goto out; } - nr_pfns = info.max_memkb >>PAGE_SHIFT ; + nr_pfns = info.max_memkb >> (PAGE_SHIFT -10 );/* cheesy sanity check */ if ( nr_pfns >1024 *1024 ){
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 5 lines · aq
Recently some people complain that they cannot set the maxmem for domU. The problem is that some code wrongly treat dom.max_memkb as in byte unit, instead of KB unit. This patch fixs the problem.
Signed-off-by Nguyen Anh Quynh <[email protected]>
The patch fixes a bug, but I doubt it fixes the 'xm balloon' problem. Did you test that before and after applying your patch?
-- Keir
Quoted 11 lines · Keir Fraser
Quoted 5 lines · aq
Recently some people complain that they cannot set the maxmem for domU. The problem is that some code wrongly treat dom.max_memkb as in byte unit, instead of KB unit. This patch fixs the problem.
Signed-off-by Nguyen Anh Quynh <[email protected]>The patch fixes a bug, but I doubt it fixes the 'xm balloon' problem. Did you test that before and after applying your patch?
actually no, i havent looked at the balloon problem yet. will do it soon.
regards,
aq