All of lore.kernel.org
 help / color / mirror / Atom feed
From: Olaf Hering <olaf@aepfle.de>
To: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: xen-devel@lists.xensource.com
Subject: Re: [PATCH] xenpaging: libxl support
Date: Wed, 28 Sep 2011 15:42:41 +0200	[thread overview]
Message-ID: <20110928134241.GA17921@aepfle.de> (raw)
In-Reply-To: <20097.65118.350804.135806@mariner.uk.xensource.com>

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

      reply	other threads:[~2011-09-28 13:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-15 15:20 [PATCH] xenpaging: libxl support Olaf Hering
2011-09-21  9:24 ` Ian Campbell
2011-09-21 11:58   ` Olaf Hering
2011-09-27 16:48 ` Ian Jackson
2011-09-28 13:42   ` Olaf Hering [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110928134241.GA17921@aepfle.de \
    --to=olaf@aepfle.de \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.