From: "Jan Beulich" Subject: Re: [PATCH v5 4/9] xen: introduce XEN_DOMCTL_devour Date: Tue, 13 Jan 2015 16:56:25 +0000 Message-ID: <54B55C490200007800054890@mail.emea.novell.com> References: <1418305541-5135-1-git-send-email-vkuznets@redhat.com> <1418305541-5135-5-git-send-email-vkuznets@redhat.com> <1421157237.19103.61.camel@citrix.com> <1421157237.19103.61.camel@citrix.com> <87oaq2d59p.fsf@vitty.brq.redhat.com> <54B554CD02000078000547EB@mail.emea.novell.com><54B554CD02000078000547EB@mail.emea.novell.com> (Jan Beulich's message of "Tue, 13 Jan 2015 16:24:29 +0000") <874mrud3z0.fsf@vitty.brq.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YB4la-0006TJ-FB for xen-devel@lists.xenproject.org; Tue, 13 Jan 2015 16:56:30 +0000 In-Reply-To: <874mrud3z0.fsf@vitty.brq.redhat.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Vitaly Kuznetsov Cc: Olaf Hering , Wei Liu , Ian Campbell , Stefano Stabellini , Andrew Cooper , Julien Grall , Ian Jackson , Andrew Jones , Tim Deegan , David Vrabel , xen-devel@lists.xenproject.org, Keir Fraser List-Id: xen-devel@lists.xenproject.org >>> On 13.01.15 at 17:45, wrote: > "Jan Beulich" writes: > >>>>> On 13.01.15 at 17:17, wrote: >>> Ian Campbell writes: >>>> An alternative approach to this might be to walk the guest p2m (with >>>> appropriate continuations) and move each domheap page (this would also >>>> help us preserve super page mappings). It would also have the advantage >>>> of not needing additional stages in the destroy path and state in struct >>>> domain etc, since all the action would be constrained to the one >>>> hypercall. >>> >>> Something like that (but not exactly) was in my RFC/WIPv2 series: >>> http://lists.xen.org/archives/html/xen-devel/2014-09/msg03624.html >>> >>> The drawback of such approach is the necessity of copying all mapped >>> more than once pages (granted pages, qemu-mapped pages, ...) or at least >>> providing blank pages instead of them. >> >> Why would that be necessary only in that alternative model? What >> gets done with pages used by other than _just_ the dying domain >> shouldn't depend on how the MFN/GFN relationship gets determined. > > The difference comes from the fact that in the current model (when we > have a hook in free_domheap_pages()) we don't care who frees the > particular page first - our dying domain or e.g. a backend from dom0, > eventually all pages are freed. In the alternative model (one hypercall > reassigning all pages) we need to go through all domheap pages before > we start domain cleanup (unless we modify the domain cleanup path) or > some or all pages may got lost. Which then looks like an argument against that alternative model. Jan