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

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



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


 


Rackspace

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