WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH 1 of 8] libxl: Fix xcinfo2xlinfo to properly set

To: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 1 of 8] libxl: Fix xcinfo2xlinfo to properly set max_memkb and target_memkb
From: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Date: Wed, 1 Sep 2010 11:39:29 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <Stefano.Stabellini@xxxxxxxxxxxxx>
Delivery-date: Wed, 01 Sep 2010 03:40:15 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <19581.14121.131285.773877@xxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <alpine.DEB.2.00.1008271214490.2545@kaball-desktop> <19581.14121.131285.773877@xxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)
On Tue, 31 Aug 2010, Ian Jackson wrote:
> Stefano Stabellini writes ("[Xen-devel] [PATCH 1 of 8] libxl: Fix 
> xcinfo2xlinfo to properly set max_memkb and target_memkb"):
> > libxl: Fix xcinfo2xlinfo to properly set max_memkb and target_memkb
> > 
> > currently xcinfo2xlinfo reads tot_pages and uses that data to calculate
> > max_memkb, while tot_pages is the memory currently used by the domain
> > and max_pages is the theoretical maximum.
> 
> > +    xlinfo->target_memkb = PAGE_TO_MEMKB(xcinfo->tot_pages);
> 
> Um, I don't think this is right, is it ?  If "target" means "memory
> target eg for domain balloon driver".
> 

"target" means memory currently used by the domain.
I should probably rename xlinfo->target_memkb to xlinfo->current_memkb


> The memory target can be read only from xenstore.  But in general if
> we are sane we always set the hypervisor's maximum to the same as the
> ballooning target.  So I'm not sure having separate "max" and "total"
> values visible to libxl callers is correct.  There two values visible
> to libxl callers should be "target" and "current".
> 
 
Unfortunately it is not that simple, in particular a slack is needed on
top of the memory target (see LIBXL_MAXMEM_CONSTANT).
But I could probably remove xlinfo->max_memkb anyway because libxl
internally can always call the libxc function directly and know exactly
what maxmem is. While libxl callers theoretically could do without this
information.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • Re: [Xen-devel] [PATCH 1 of 8] libxl: Fix xcinfo2xlinfo to properly set max_memkb and target_memkb, Stefano Stabellini <=