WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] xenpaging: libxl support

To: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] xenpaging: libxl support
From: Olaf Hering <olaf@xxxxxxxxx>
Date: Wed, 28 Sep 2011 15:42:41 +0200
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 28 Sep 2011 06:43:48 -0700
Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; t=1317217377; l=2449; s=domk; d=aepfle.de; h=In-Reply-To:Content-Type:MIME-Version:References:Subject:Cc:To:From: Date:X-RZG-CLASS-ID:X-RZG-AUTH; bh=Fi6GU9sf9NzAk9pEflX6u7/LiDg=; b=MRnKAKh0PT3m8FbuIXpoC/bt5koCynj9VtwXnMHEAdZ9I+MRKpUqNeZ6Uxnha//8dlw UyS7mwq+nbFtnoKMwX3ciEpLXX80/PO5/qvokMrMGBB4o0yrSPrbDbQcnXdAGpP7LOTL6 QfHpEGpjovOPX6oM8mlChE3Cc/CkfwN0uxs=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20097.65118.350804.135806@xxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <c9a9779fd9581666c327.1316100011@xxxxxxxxxxxx> <20097.65118.350804.135806@xxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.21.rev5535 (2011-07-01)
On Tue, Sep 27, Ian Jackson wrote:

> Olaf Hering writes ("[Xen-devel] [PATCH] xenpaging: libxl support"):
> > The patch adds four new config options:
> > xenpaging=<int> , 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

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>