From: Wei Liu Subject: Re: xl mem-max error Date: Mon, 10 Nov 2014 12:37:47 +0000 Message-ID: <20141110123747.GE28360@zion.uk.xensource.com> References: <545BF386.1050106@oracle.com> <20141107110512.GA12109@zion.uk.xensource.com> <545CD572.9040801@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XnoEA-0002xN-Um for xen-devel@lists.xenproject.org; Mon, 10 Nov 2014 12:37:51 +0000 Content-Disposition: inline In-Reply-To: <545CD572.9040801@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: Zhigang Wang Cc: Ian Jackson , xen-devel , Wei Liu , Ian Campbell List-Id: xen-devel@lists.xenproject.org On Fri, Nov 07, 2014 at 09:21:38AM -0500, Zhigang Wang wrote: > On 11/07/2014 06:05 AM, Wei Liu wrote: > > On Thu, Nov 06, 2014 at 05:17:42PM -0500, Zhigang Wang wrote: > >> Hi, > >> > >> I get this error: > >> > >> # xl mem-max 3 700 > >> libxl: error: libxl.c:4549:libxl_domain_setmaxmem: memory_static_max must be greater than or or equal to memory_dynamic_max > >> : Success > >> cannot set domid 3 static max memory to : 700 > >> > > > > What's your expected behaviour? What's your end goal? > > I expect: after start a VM with memory = 700, then I can do: > > # xl mem-max 700 > > In our code, we always check (libxl.c): > > > if (max_memkb < memorykb) { > LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "memory_static_max must be greater than or or equal to memory_dynamic_max\n"); > goto out; > } > > As target memory is always bigger than static-max in xenstore (from my test, for both pv and hvm): > > /local/domain/3/memory/static-max = "716800" > /local/domain/3/memory/target = "716801 > > So it will not success. > > Also I think target memory bigger than static-max seems not right. > This does look bogus, which may cause the guest to try to balloon up over limit. At the very least, we should fix make target as big as statix-max? Ian and Ian, any thought how this bug came into being? I think we should fix this for 4.5, but I don't think I know enough of how memory target is expected to behave. Wei.