From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Wilson Subject: Re: [PATCH] xend: Fix xm list bug reporting incorrect memory size Date: Wed, 5 Jun 2013 12:01:26 -0700 Message-ID: <20130605190124.GA5470@u109add4315675089e695.ant.amazon.com> References: <1364924327-31151-1-git-send-email-konrad.wilk@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1364924327-31151-1-git-send-email-konrad.wilk@oracle.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Konrad Rzeszutek Wilk Cc: Marcos Matsunaga , xen-devel@lists.xensource.com, ian.campbell@citrix.com List-Id: xen-devel@lists.xenproject.org On Tue, Apr 02, 2013 at 01:38:47PM -0400, Konrad Rzeszutek Wilk wrote: > From: Marcos Matsunaga > > 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. I think this makes sense, but I think the real problem is that we cache the value at all. > 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 > Signed-off-by: Konrad Rzeszutek Wilk > --- > 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: You need to fix tabs v/s spaces. Indent with spaces *only* for python code. --msw > + self._dominfo_to_xapi(dominfo, update_mem = True) > self.validate() > > def update_with_xenapi_config(self, xapi):