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] Re: mem-event interface

To: Dan Magenheimer <dan.magenheimer@xxxxxxxxxx>
Subject: Re: [Xen-devel] Re: mem-event interface
From: Grzegorz Milos <grzegorz.milos@xxxxxxxxx>
Date: Sun, 27 Jun 2010 16:30:34 +0100
Cc: "Xen-Devel \(E-mail\)" <xen-devel@xxxxxxxxxxxxxxxxxxx>, george.dunlap@xxxxxxxxxxxxx, "Bryan D. Payne" <bryan@xxxxxxxxxxxx>, Patrick Colp <pjcolp@xxxxxxxxx>, Andrew Peace <Andrew.Peace@xxxxxxxxxxxxx>, Steven Hand <Steven.Hand@xxxxxxxxxxxxx>
Delivery-date: Sun, 27 Jun 2010 08:31:35 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=/JexcZt/W5gXk28rs48FJ2MWfziqxDNFbIdm7pxjaXU=; b=hFTYdl1o+QuPpcCuWbKmu3Nn5aBFgdTYZZQGH8pP8OyxgN7WcZFzwXurFYxGuEDzWw LYoflIlypPzLYdNCw2mnQfNinaDQ9P9fxEXhd9pW5BPNWQ/zK02EKzEbTSnjtj/k93fc V1BRwRrzLa9D7IAfzUUYOy5hj+H02iDOxcBsM=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=hLKsZLg30xzTzydeg/fTA5LR/NM51Xt5HOHekn7xBOwltzerl3XKJOo/BBh5AdHjfZ EBAW5nVcgBYhxunkfb3YfKPEz6DxvzhQxlsI0DXAdCYhxHkOYN710tysG/x1/fA0OZFB 51jkpayifAUW+1mjIJYZBSPaRCUP/N2CNln6g=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <63802654-4534-4139-b380-89d341e32864@default>
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: <AANLkTimW9Q3ro-egPYj2zz6B3d20lgxz_syh8oiVrzNR@xxxxxxxxxxxxxx> <63802654-4534-4139-b380-89d341e32864@default>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Tim has already answered some of your questions, let me fill in the gaps.

> I assume you are posting this offlist discussion for
> participation and feedback.  You moved quickly from
> claiming a vague need into very specific mechanisms,
> so pardon me if I need to take a step back.  The
> page sharing code was added very quickly to xen-unstable
> last year without (afaict) much review or iteration,
> so there's probably other developers that could use some
> additional background.  I appreciate that you are
> moving this phase into open discussion!

The code got dropped into Xen quite quickly (partly) because I was
leaving Citrix, and therefore we wanted to make the code available,
before I was gone. While I cannot work on it full time any more, I
want to contribute some of my time to the project, to make it more
usable, document it and to smoothen out the rough endges.

> I gather the 'OOM event' occurs when a guest tries to write
> to memory on a page that it thinks it owns, but the page
> is actually transparently shared.  As a result, the
> write must fail and instead some hypervisor swapping
> activity must occur, apparently driven by a userland
> process in dom0 to some swap disks that are configured
> and owned by dom0?  If this is correct, why is it
> necessary for address/sub-page/translation information
> to be included in the event... it is likely that it
> won't be this specific page that is swapped out,
> correct?

To reiterate Tim's point. The mem-event interface is supposed to be
general enough to send a bunch of different memory management events
through. OOM events are about particular domains, and not about
specific frames/pages. Similarly, sub-page access events should albo
be supported.

> I'm not clear on why/when the "handle invalidate" event
> might occur.  Could you explain more?

This is specific to memory sharing, it means that a particular memory
frame (represented by an opaque sharing handle) is no longer sharable.

> I still have to raise a general objection to hypervisor
> swapping in any real world workload.  The VMware users I've
> talked to hate it and turn off page sharing because of it.
> While there are definitely some workloads where page
> sharing can have a huge advantage (essentially by being so
> homogeneous and "static" across many guests as to avoid
> any swapping), it is not widely used because of swapping.

I guess this is out of scope of this particular email thread. But to
shed some light on it, the extra memory gained through sharing can be
used in several different ways. Some of them will require the
safeguards against OOM, which implies paging. In my view, the paging
functionality should be supported, and the tools should implement a
policy which provides best performance+predictability.

> I had vaguely thought you had managed to avoid the worst
> of the swapping problems but I don't recall why/how...
> and I had thought that any swapping that did exist was
> solved by the page sharing code as submitted, but
> never had a chance to dig deeper.

My approach relies on PV domains, or at least virtualisation aware
memory management. The current memory sharing code concentrates on HVM
domains though. The long term goal is definitely to optimise the
VM-hypervisor memory management as much as possible.

Thanks
Gregor

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

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