[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] xend: Fix xm list bug reporting incorrect memory size



From: Marcos Matsunaga <Marcos.Matsunaga@xxxxxxxxxx>

Make sure memory is updated every time XendConfig.update is called.

Without this patch, if a guest self-balloons, the amount of memory
that 'xend' thinks the guest is using is based on last cached value.
This means the reported value is nowhere close to what the real
value is.

This change allows xend to double-check the xcinfo info (which
hypercall it had already do) and use the up-to-date contents.

'xl' already does this by using the xcinfo.

Oracle-Bug: 14553104 ( MEM(K) IN XENTOP MISMATCH MEMTOTAL IN /PROC/MEMINFO AND 
MEM IN "XM LIST")
Signed-off-by: Marcos Matsunaga <Marcos.Matsunaga@xxxxxxxxxx>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
---
 tools/python/xen/xend/XendConfig.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tools/python/xen/xend/XendConfig.py 
b/tools/python/xen/xend/XendConfig.py
index 4a226a7..d8a2535 100644
--- a/tools/python/xen/xend/XendConfig.py
+++ b/tools/python/xen/xend/XendConfig.py
@@ -1041,7 +1041,10 @@ class XendConfig(dict):
         @param dominfo: Domain information via xc.domain_getinfo()
         @type dominfo: dict
         """
-        self._dominfo_to_xapi(dominfo)
+       if dominfo['paused']:
+           self._dominfo_to_xapi(dominfo)
+        else:
+           self._dominfo_to_xapi(dominfo, update_mem = True)
         self.validate()
 
     def update_with_xenapi_config(self, xapi):
-- 
1.8.0.2


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.