From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Vrabel Subject: Re: Xen balloon driver improvement (version 1) Date: Thu, 23 Oct 2014 11:58:31 +0100 Message-ID: <5448DF57.1020704@citrix.com> References: <20141022162930.GA8489@zion.uk.xensource.com> <5448D3CF.8090005@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Stefano Stabellini Cc: Andrew Cooper , Boris Ostrovsky , Wei Liu , Ian Campbell , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On 23/10/14 11:52, Stefano Stabellini wrote: > On Thu, 23 Oct 2014, David Vrabel wrote: >> On 22/10/14 17:29, Wei Liu wrote: >>> >>> ### Make use of balloon page compaction >> [...] >>> The core of migration callback is XENMEM\_exchange hypercall. This >>> makes sure that inflation of old page and deflation of new page is >>> done atomically, so even if a domain is beyond its memory target and >>> being enforced, it can still compact memory. >> >> XENMEM_exchange doesn't really have the behaviour that is needed here. >> >> Page migration splits the memory map into two parts, the populated area >> at the bottom and the balloon area. The populated area is fragmented by >> ballooned pages, and the balloon area is fragmented by populated pages. >> >> Consider a single ballooned page in the middle of an otherwise intact >> superframe. Page migration wants to populate this page and depopulate a >> different page from the balloon area. >> >> A hypercall that can do an atomic populate and depopulate will allow xen >> to easily recreate the superframe (if the missing frame is free). >> XENMEM_exchange will leave the superframe fragmented. > > XENMEM_exchange should be capable of doing that. If it is not today, it > could be fixed. Am I missing something? What the problem at the > interface level with XENMEM_exchange? I'm probably not understanding what XENMEM_exchange does. If it has the correct behaviour already then that's fine. David