xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Olaf Hering <olaf@aepfle.de>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: George Dunlap <George.Dunlap@eu.citrix.com>,
	"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	Andres Lagarcavilla <andres@lagarcavilla.org>
Subject: Re: [PATCH] RFC: initial libxl support for xenpaging
Date: Fri, 24 Feb 2012 23:19:54 +0100	[thread overview]
Message-ID: <20120224221954.GA23882@aepfle.de> (raw)
In-Reply-To: <1330101594.8557.222.camel@zakaz.uk.xensource.com>

On Fri, Feb 24, Ian Campbell wrote:

> On Fri, 2012-02-24 at 15:38 +0000, Olaf Hering wrote:
> > On Fri, Feb 24, Ian Campbell wrote:
> > 
> > > Here is an updated version of my proposed interface which includes
> > > sharing, I think as you described (modulo the use of mem-paging-set
> > > where you said mem-set above).
> > > 
> > > I also included "mem-paging-set manual" as an explicit thing with an
> > > error on "mem-paging-set N" if you don't switch to manual mode. This
> > > might be too draconian -- I'm not wedded to it.
> > > 
> > > maxmem=X                        # maximum RAM the domain can ever see
> > > memory=M                        # current amount of RAM seen by the
> > > 				# domain
> > > paging=[off|on]                 # allow the amount of memory a guest 
> > >                                 # thinks it has to differ from the
> > >                                 # amount actually available to it (its
> > >                                 # "footprint")
> > > pagingauto=[off|on] (dflt=on)   # enable automatic enforcement of 
> > >                                 # "footprint" for guests which do not
> > >                                 # voluntarily obey changes to memory=M 
> > > pagingdelay=60                  # amount of time to give a guest to 
> > >                                 # voluntarily comply before enforcing a 
> > >                                 # footprint
> > > pagesharing=[off|on]		# cause this guest to share pages with
> > > 				# other similarly enabled guests where
> > > 				# possible. Requires paging=on.
> > > pageextrapolocy=...		# controls what happens to extra pages 
> > > 				# gain via sharing (could be combined 
> > > 				# with pagesharing option:
> > > 				#	[off|policy|...])
> > > 
> > >         Open question -- does pagesharing=on require paging=on? I've
> > >         tried to specify things below such that it does not, but it
> > >         might simplify things to require this.
> > > 
> > > xl mem-set domain M
> > >         Sets the amount of RAM which the guest believes it has available
> > >         to M. The guest should arrange to use only that much RAM and
> > >         return the rest to the hypervisor (e.g. by using a balloon
> > >         driver). If the guest does not do so then the host may use
> > >         technical means to enforce the guest's footprint of M. The guest
> > >         may suffer a performance penalty for this enforcement.
> > > 
> > >         paging off:     set balloon target to M.
> > >         paging on:      set balloon target to M.
> > >                         if pagingauto:
> > >                                 wait delay IFF new target < old
> > >                                 set paging target to M
> > >                                 support -t <delay> to override default?
> > 
> > Instead of having two now config options pagingauto= and pagingdelay=,
> > what about 'xl mem-set -t <seconds>' to adjust the fixed internal value
> > pagingdelay=? Then '-t 0' could mean pagingauto=off, which means use
> > both ballooning and paging to reach the "footprint" M.
> 
> So you mean:
> 
> 	paging on:	set balloon target to M.
> 			if pagingdelay > 0:
> 				wait delay IFF new target < old
> 			else:
> 				pagingauto=off
> 			set paging target to M
> 
> or
> 
> 	paging on:	set balloon target to M.
> 			if pagingdelay > 0:
> 				wait delay IFF new target < old
> 				set paging target to M
> 			else:
> 				pagingauto=off
> 
> ? (the difference being whether or not we set the paging at all if delay
> == 0). 
> 
> I don't think I like overloading "-t 0" to also turn off auto mode like
> that. It makes it less explicit when you are disabling auto mode and
> entering "you have to know what you are doing" territory.

I misunderstood what pagingauto= is supposed to do.

So 'xl mem-set -t <sec> D N' could be:
        set balloon target to N
        if paging && pagingauto:
                if pagingdelay > 0:
                        wait pagingdelay
                set paging target to N

And -t 0 would just set the paging target right away so that the
footprint is reached fast, at the expense of concurent
ballooning+paging.

Is an extra pagingdelay= .cfg option is really helpful if the -t option
exists? I think it would be part of libxl then, and other libxl users
like libvirt may need to implement a knob similar to -t <sec> in their
mem-set implementation? Or should the actual waiting of <sec> be done in
libxl itself? Perhaps the pagingdelay= could be some sort of
recommendation for those who implement the "mem-set" function.
I'm just wondering where the actual waiting should be done, its not yet
part of the proposal. I think the actual memory change is an asynchron
event, so the xl monitoring process could do the actual work and the
mem-set command is just the trigger. Other libxl users would need their
own monitoring.

> With my original proposal you can do
> 	xl mem-set -t 0 D N
> and that will do both paging and ballooning enabled but will stay in
> auto mode, if that's what you want.
> 
> If you really want to also turn off auto mode then with my N-1th
> proposal you would do:
> 	xl mem-set -t 0 D N && xl mem-paging-set D N
> but that is more explicit about turning off auto mode. In my most recent
> proposal you'd have to do :
> 	xl mem-set -t 0 D N && xl mem-paging-set D manual && xl mem-paging-set D N
> which is a little _too_ explicit perhaps. I suspect the previous
> proposal was preferable in this regard?

About the 'xl mem-paging-set D manual' part I'm not sure yet.

Should 'xl mem-paging-set D N && xl mem-set D M' undo the paging target
from mem-paging-set? If yes, the manual mode is not needed. If no, then
a manual/auto mode is needed.

Olaf

  reply	other threads:[~2012-02-24 22:19 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-16  7:47 [PATCH] RFC: initial libxl support for xenpaging Olaf Hering
2012-02-17 13:44 ` Ian Campbell
2012-02-17 14:25   ` Olaf Hering
2012-02-17 14:58     ` Ian Campbell
2012-02-17 15:24       ` Olaf Hering
2012-02-17 15:33         ` Ian Campbell
2012-02-17 15:43           ` Olaf Hering
2012-02-17 15:54             ` Ian Campbell
2012-02-17 16:03               ` Olaf Hering
2012-02-17 16:43                 ` Ian Campbell
2012-02-20 10:44                   ` George Dunlap
2012-02-20 11:12                     ` Olaf Hering
2012-02-20 14:48                       ` George Dunlap
2012-02-20 15:19                         ` Olaf Hering
2012-02-20 16:06                           ` George Dunlap
2012-02-20 15:38                         ` Olaf Hering
2012-02-20 16:04                           ` George Dunlap
2012-02-21  9:59                         ` Ian Campbell
2012-02-21 11:27                           ` Olaf Hering
2012-02-21 11:34                             ` Ian Campbell
2012-02-21 12:21                               ` Olaf Hering
2012-02-21 12:20                           ` George Dunlap
2012-02-23 10:42                             ` Ian Campbell
2012-02-23 12:18                               ` George Dunlap
2012-02-23 16:22                                 ` Andres Lagar-Cavilla
2012-02-23 17:30                                   ` George Dunlap
2012-02-24 10:11                                 ` Ian Campbell
2012-02-24 15:38                                   ` Olaf Hering
2012-02-24 16:39                                     ` Ian Campbell
2012-02-24 22:19                                       ` Olaf Hering [this message]
2012-02-24 17:12                                   ` Andres Lagar-Cavilla
2012-02-27  9:44                                     ` Ian Campbell
2012-02-27 14:45                                       ` Andres Lagar-Cavilla
2012-02-28 13:05                                         ` George Dunlap
2012-02-28 15:25                                           ` Andres Lagar-Cavilla
     [not found]                                             ` <CAFLBxZapKUVaiz4e-VwGTwj0a0FOPij5hXrRkevrTC6brtug4Q@mail.gmail.com>
2012-02-28 17:03                                               ` Fwd: " George Dunlap
2012-03-06 23:07                                           ` Andres Lagar-Cavilla
     [not found]                                   ` <CAFLBxZavBR0c_p1E9NpfkNzhrN-LCbtV=kPRwFZ3VFFMKPBNKg@mail.gmail.com>
2012-02-28 17:02                                     ` Fwd: " George Dunlap
2012-02-28 17:12                                       ` Ian Campbell
2012-02-21  9:05                     ` Ian Campbell
     [not found] <mailman.3929.1329497068.1471.xen-devel@lists.xensource.com>
2012-02-17 16:55 ` Andres Lagar-Cavilla
2012-02-17 17:03   ` Ian Campbell

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=20120224221954.GA23882@aepfle.de \
    --to=olaf@aepfle.de \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=andres@lagarcavilla.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).