From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andres Lagar-Cavilla Subject: Re: [PATCH] libxenlight: implement libxl_set_memory_target Date: Wed, 09 Dec 2009 15:47:17 -0500 Message-ID: <4B200CD5.30807@lagarcavilla.com> References: <20091208200031.4903B5980EB@homiemail-mx11.g.dreamhost.com> <4B1EB743.3090102@lagarcavilla.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Stefano Stabellini Cc: "xen-devel@lists.xensource.com" , Vincent Hanquez List-Id: xen-devel@lists.xenproject.org Stefano Stabellini wrote: > On Tue, 8 Dec 2009, Andres Lagar-Cavilla wrote: > >> Hi, >> couple of comments: >> - PV domains without videoram won't be able to use this >> > > PV domains just have videoram = 0. > But you abort libxl_set_memory_target if the videoram node is not found. Which won't be for PVs with no videoram... + videoram_s = libxl_xs_read(ctx, XBT_NULL, libxl_sprintf(ctx, "%s/memory/videoram", dompath)); + if (!videoram_s) + return -1; Andres > >> - Further, doesn't the PV domain build function need to use >> target_memkb? (That's my read of what xend does at least) >> > > Yes, you are right, I'll fix this. > > >> - Finally, LIBXL_MAXMEM_CONSTANT looks like an "evil constant we should >> avoid". Where did it come from? >> > > I decided to introduce this constant after a discussion with developers > of the memory management functions in xapi: after thorough testing they > found that adding 1 MB to maxmem increases the robustness of the system. > > BTW the current value of the constant is wrong because it should be > expressed in KB, I'll send a patch to fix this later today. > >