Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2955154pxk; Mon, 28 Sep 2020 04:56:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwQUHnkMoCkvxUfuahqjObUa6XuORZZaqE183+upLhyVy5bhC77HhSms8K09BMRApilcBrE X-Received: by 2002:a17:906:a002:: with SMTP id p2mr1153292ejy.399.1601294163810; Mon, 28 Sep 2020 04:56:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601294163; cv=none; d=google.com; s=arc-20160816; b=k0stw/qLrPjm9lDgkdmpMXQXuPTGx+VAHGIknUqFXwCvMI1kYRVbMlNm58liazpiEm OCstDllYmMPB/7TqULXLZg3S7ES6i1hC5ZoxERVgCkreRi4OlEDxIB+DnCgbDZp8PGGg ty9TyC08GuL6pQE1zhGw3zA6ag+im9VbYZtKQ0jUNbxPppPDLeb0eO4f4j4D/FGXJJEb jk4EpsqjDuev/F4/Rt0a1BGp0eIeDgbmqJ/Rf9P1dQHs2N6klRtdueWmSda3WVRD2QEg CB/LwWaWpszZ38yzYPdZ/q0BieZ27kS/j1zc937zy7hhf9gPyzkQpBi/VNYjXof6+7xN P4tg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=WQxf8eR0dURUFnxSfO8awhZP1MTj2t0jw3MmlFzeHs0=; b=dgrfiK4932RG4UW8BFyPYrM0I5KfXGb0shBAGS7zFw5k9MncU7oaCBeJOEV059GbF1 h4OOoIUVpghOd8GgTpK5rJ5SVa3PnVQco1aW5luHVkjRxW/gw+yy9Mmigv+2uFijfylT H5Bm/aTl5ajuSFkDmr/3pvzY/Y35IW73oflEvq93g1rorBuN958uH5n4qDJ8h6F+6t39 itot6VdONyp6fzJuK9Sry9CtxO6TdOFluivwU0KNIKM/UMTtv7ZZCB4/LNj1+ORs8Xzt KtnYhuvZIvQHBbugo0daxQ7rAepgya2c7+i2CkgId5C3GN9/duT6UpVccKJacSVM9ki1 e5cA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=GMtSjZZf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ap10si444158ejc.106.2020.09.28.04.55.39; Mon, 28 Sep 2020 04:56:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=GMtSjZZf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726674AbgI1LxJ (ORCPT + 99 others); Mon, 28 Sep 2020 07:53:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44128 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726547AbgI1LxJ (ORCPT ); Mon, 28 Sep 2020 07:53:09 -0400 Received: from mail-oi1-x243.google.com (mail-oi1-x243.google.com [IPv6:2607:f8b0:4864:20::243]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15E96C061755; Mon, 28 Sep 2020 04:53:09 -0700 (PDT) Received: by mail-oi1-x243.google.com with SMTP id 26so977901ois.5; Mon, 28 Sep 2020 04:53:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=WQxf8eR0dURUFnxSfO8awhZP1MTj2t0jw3MmlFzeHs0=; b=GMtSjZZfxG9MbEdffePlO1h7sC8ZgA63nZOWgJl6O48iDiGXuLeFSRWMwtxi8ApR5d WO6QHpzwYEQSnol1QWCM3fhLtodSPBObnSi4NDrpDMe/DlxKbN/cxOp6H5x+B06ytI2D ZABv1vTdi2CWD6G3MMfXTr3IiEVXXt84u/gtI6VqlnMe2o6aoHbl7XzHxU9iRK53asTK K4Y3AxkrNychFccLD+p9Rp5/UQc23Jku0q/1HOBxumpU+GZhV0sFFMNnYTCmjZtSEzGL adr1lYYEIT/L8/F76Sg8WB8Yy9ZdkPDAsJ7FfgnxD3Rjd5Hb3YvUuyndx/F7R+2Ycnjm PVXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=WQxf8eR0dURUFnxSfO8awhZP1MTj2t0jw3MmlFzeHs0=; b=nGYPNMKt3aVvGWMGSxDPEepyzRcZ1WTNB18ulVPAvlvbtl1O/F0a6pepRRz0Msb4lm l4x3MlhWzkoVmMfAR4cRJ61Xz7CcR4CaBhYKSHreyKpI0no9W917AqxVasFpPrBrKutv LnxCuVSwldwb0sRdSUhFsayFco9KrTCEguIWcJ6icBSc822T6aQgBiXcvvV0M+sDRdF4 hhIEZga+eG7lSlgjraxAEc1BKJuFLSzAzUrIEGLVviWvvJEtngTy4714pviAFy0UOnl5 4+IEH3f0G83p48nxJONFvhbe04YFe7JOe5c4hVJ5iUFbsedeFhY+IOZ/Jxi/obF7bF6x nqXg== X-Gm-Message-State: AOAM531dFTLtgCXmvIrJXrzLcGpLnDROWtCWsNvHANs8doAvfNZi24AH io2p2YHHIxCNet+iNcruGZGDxzmf3RUucWyH+Lw= X-Received: by 2002:a05:6808:98f:: with SMTP id a15mr665150oic.58.1601293988496; Mon, 28 Sep 2020 04:53:08 -0700 (PDT) MIME-Version: 1.0 References: <2592097d-3190-1862-b438-9e1b16616b82@redhat.com> In-Reply-To: <2592097d-3190-1862-b438-9e1b16616b82@redhat.com> From: yulei zhang Date: Mon, 28 Sep 2020 19:52:57 +0800 Message-ID: Subject: Re: [RFC V2 0/9] x86/mmu:Introduce parallel memory virtualization to boost performance To: Paolo Bonzini Cc: Ben Gardon , Wanpeng Li , kvm , LKML , Sean Christopherson , Jim Mattson , Junaid Shahid , Vitaly Kuznetsov , Xiao Guangrong , Haiwei Li Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Sep 26, 2020 at 4:50 AM Paolo Bonzini wrote: > > On 25/09/20 19:30, Ben Gardon wrote: > > Oh, thank you for explaining that. I didn't realize the goal here was > > to improve LM performance. I was under the impression that this was to > > give VMs a better experience on startup for fast scaling or something. > > In your testing with live migration how has this affected the > > distribution of time between the phases of live migration? Just for > > terminology (since I'm not sure how standard it is across the > > industry) I think of a live migration as consisting of 3 stages: > > precopy, blackout, and postcopy. In precopy we're tracking the VM's > > working set via dirty logging and sending the contents of its memory > > to the target host. In blackout we pause the vCPUs on the source, copy > > minimal data to the target, and resume the vCPUs on the target. In > > postcopy we may still have some pages that have not been copied to the > > target and so request those in response to vCPU page faults via user > > fault fd or some other mechanism. > > > > Does EPT pre-population preclude the use of a postcopy phase? > > I think so. > > As a quick recap, turn postcopy migration handles two kinds of > pages---they can be copied to the destination either in background > (stuff that was dirty when userspace decided to transition to the > blackout phase) or on-demand (relayed from KVM to userspace via > get_user_pages and userfaultfd). Normally only on-demand pages would be > served through userfaultfd, while with prepopulation every missing page > would be faulted in from the kernel through userfaultfd. In practice > this would just extend the blackout phase. > > Paolo > Yep, you are right, based on current implementation it doesn't support the postcopy. Thanks for the suggestion, we will try to fill the gap with proper EPT population during the post-copy. > > I would > > expect that to make the blackout phase really long. Has that not been > > a problem for you? > > > > I love the idea of partial EPT pre-population during precopy if you > > could still handle postcopy and just pre-populate as memory came in. > > >