From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752623AbdDNC04 (ORCPT ); Thu, 13 Apr 2017 22:26:56 -0400 Received: from mga09.intel.com ([134.134.136.24]:61404 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751332AbdDNC0x (ORCPT ); Thu, 13 Apr 2017 22:26:53 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,195,1488873600"; d="scan'208";a="88734736" Message-ID: <58F033D0.7080101@intel.com> Date: Fri, 14 Apr 2017 10:28:32 +0800 From: Wei Wang User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: "Michael S. Tsirkin" , Matthew Wilcox CC: virtio-dev@lists.oasis-open.org, linux-kernel@vger.kernel.org, qemu-devel@nongnu.org, virtualization@lists.linux-foundation.org, kvm@vger.kernel.org, linux-mm@kvack.org, david@redhat.com, dave.hansen@intel.com, cornelia.huck@de.ibm.com, akpm@linux-foundation.org, mgorman@techsingularity.net, aarcange@redhat.com, amit.shah@redhat.com, pbonzini@redhat.com, liliang.opensource@gmail.com Subject: Re: [PATCH v9 0/5] Extend virtio-balloon for fast (de)inflating & fast live migration References: <1492076108-117229-1-git-send-email-wei.w.wang@intel.com> <20170413204411.GJ784@bombadil.infradead.org> <20170414044515-mutt-send-email-mst@kernel.org> In-Reply-To: <20170414044515-mutt-send-email-mst@kernel.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/14/2017 09:50 AM, Michael S. Tsirkin wrote: > On Thu, Apr 13, 2017 at 01:44:11PM -0700, Matthew Wilcox wrote: >> On Thu, Apr 13, 2017 at 05:35:03PM +0800, Wei Wang wrote: >>> 2) transfer the guest unused pages to the host so that they >>> can be skipped to migrate in live migration. >> I don't understand this second bit. You leave the pages on the free list, >> and tell the host they're free. What's preventing somebody else from >> allocating them and using them for something? Is the guest semi-frozen >> at this point with just enough of it running to ask the balloon driver >> to do things? > There's missing documentation here. > > The way things actually work is host sends to guest > a request for unused pages and then write-protects all memory. > > So guest isn't frozen but any changes will be detected by host. > Probably it's better to say " transfer the info about the guest unused pages to the host so that the host gets a chance to skip the transfer of the unused pages during live migration". Best, Wei