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

Re: [Xen-devel] [PATCH v6 16/16] libxl/arm: Add the size of ACPI tables to maxmem



On Tue, Sep 27, 2016 at 09:01:00AM -0700, Shannon Zhao wrote:
> 
> 
> On 2016/9/27 2:41, Wei Liu wrote:
> >On Mon, Sep 26, 2016 at 02:54:55PM -0700, Shannon Zhao wrote:
> >>
> >>
> >>On 2016/9/22 7:10, Wei Liu wrote:
> >>>>diff --git a/tools/libxl/libxl_dom.c b/tools/libxl/libxl_dom.c
> >>>>>index 2924629..118beab 100644
> >>>>>--- a/tools/libxl/libxl_dom.c
> >>>>>+++ b/tools/libxl/libxl_dom.c
> >>>>>@@ -408,8 +408,15 @@ int libxl__build_pre(libxl__gc *gc, uint32_t domid,
> >>>>>         }
> >>>>>     }
> >>>>>
> >>>>>+
> >>>>>+    rc = libxl__arch_memory_constant(gc, info, state);
> >>>>>+    if (rc < 0) {
> >>>>>+        LOGE(ERROR, "Couldn't get arch constant memory size");
> >>>>>+        return ERROR_FAIL;
> >>>>>+    }
> >>>>>+
> >>>>>     if (xc_domain_setmaxmem(ctx->xch, domid, info->target_memkb +
> >>>>>-        LIBXL_MAXMEM_CONSTANT) < 0) {
> >>>>>+        LIBXL_MAXMEM_CONSTANT + rc) < 0) {
> >>>I think this LIBXL_MAXMEM_CONSTANT should be pushed to your helper
> >>>function, too.
> >>>
> >>>So that, we can have all LIBXL_MAXMEM_CONSTANT removed in libxl
> >>>functions (see libxl.c and libxl_dom.c)
> >>>
> >>If we push LIBXL_MAXMEM_CONSTANT to the libxl_arch_memory_constant and
> >>remove it from libxl.c, do we need to call libxl_arch_memory_constant there
> >>in libxl_set_memory_target()?
> >>
> >
> >Yes, we need to call that function everywhere to get consistent results.
> >That's the reason I asked you to consolidate it to a function.
> >
> Well it's a little awkward I think, since in libxl_domain_setmaxmem() and
> libxl_set_memory_target() it seems it can't get the parameters info and
> state for libxl__arch_memory_constant().
> I'm not sure how to solve it. Wei, any suggestion?
> 

Hmm...

The first question is can state be derived from build_info ? From my
quick skim of the code the answer is likely yes.

Then, you can call libxl_retrieve_domain_configuration to get
domain_config, then domain_config->build_info, so that you can derive
state from it.

Feel free to ask more questions.

Without such arrangement, ballooning is going to be broken for ARM
guests.


Wei.

> Thanks,
> -- 
> Shannon

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

 


Rackspace

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