From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olaf Hering Subject: Re: [PATCH] xenpaging: libxl support Date: Wed, 28 Sep 2011 15:42:41 +0200 Message-ID: <20110928134241.GA17921@aepfle.de> References: <20097.65118.350804.135806@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Return-path: Content-Disposition: inline In-Reply-To: <20097.65118.350804.135806@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Jackson Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On Tue, Sep 27, Ian Jackson wrote: > Olaf Hering writes ("[Xen-devel] [PATCH] xenpaging: libxl support"): > > The patch adds four new config options: > > xenpaging= , the number of pages to page-out > ... > > +libxl_xenpaging_info = Struct("xenpaging_info",[ > > + ("xenpaging", integer, False, "number of pages"), > ... > > + if (!xlu_cfg_get_long (config, "xenpaging", &l)) > > + xp_info->xenpaging = l; > > The config file setting should be a number of megabytes, just like > "memory", "maxmem", etc., not a number of pages. And at the libxl > interface it should be a number of kilobytes like max_memkb et al. I will change that part. > Also as I said at the hackathon, I think that we need a more > sophisticated approach to the interaction with ballooning. I would > like to see the argument to the xenpaging daemon not be a target > number of pages to page out, but rather for it to be a total memory > usage target. That would mean xenpaging has to monitor tot_pages and try to reach the configured number? > The effect of this would be that you could tell a guest to balloon > down, but also tell xenpaging to page it out, and balance between > ballooning and paging is then up to the guest. Does a guest even know its paged? If I understand it correctly, mem-set will ask the guests balloon driver to work toward that number, but if xenpaging is instructed to page-out the entire guest, the guest wont notice it. A new mem-tot_pages command (with a better name) would limit the amount of consumed mfns, while mem-set would limit the amount of mfns the guest balloon driver thinks it has. Is it that what you have in mind? > > +static int libxl__create_xenpaging(libxl__gc *gc, char *dom_name, uint32_t domid, libxl_xenpaging_info *xp_info) > > +{ > > + [a lot of stuff] > > Can any of this be factored out and made common with the device model > creation ? Yes. The current device model startup uses the spawn functions, and things like *_record_pid and libxl__wait_for_* should be part of the spawn interface itself because the way libxl__spawn_spawn works a read from the pipe has to happen in some way. I will prepare patches for review. > Also: > - what deletes the logfile, if anything ? The pagefile is unlinked by xenpaging on exit. > - will the xenpaging daemon automatically exit if the domain dies ? xenpaging has a watch on @releaseDomain. Olaf