Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp1500229rwn; Thu, 8 Sep 2022 22:12:32 -0700 (PDT) X-Google-Smtp-Source: AA6agR4Mqi1loTTwJuucmUadL0i0ZC/p22isbnZd9dVHqHfA4kuiDOiJJdvFO4rbraEfMzD4Crf2 X-Received: by 2002:a05:6512:2629:b0:492:b1e7:bf26 with SMTP id bt41-20020a056512262900b00492b1e7bf26mr3533100lfb.254.1662700352657; Thu, 08 Sep 2022 22:12:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662700352; cv=none; d=google.com; s=arc-20160816; b=rX1ssY67gQ0o6hXsWFhu/CgV1MeltZJd1rVwh4/I7iIRTyP0lDlyHARh4wVN5+BKsu QtIXS9oDIPsyH78zwfV4XrQQNR+Z4NeJbzguZyszaJiCaW9FrioFLdU7ymYycfJw5hfC pxfomm6mfvcqdRF/+p/O0Uudl4hBOUKz8aomhOUCJfADYDnUD+rughKq+uwt2WASwmWx 1Qv1R2+KFW8bzQERrALdVb5OzC1t0IZ2fBBw1YqQ4ZcWJtDXFr2waEY8lTMgxal3E+Wc OAFG6NoH8D0pW+tS+bvcKasR6etBKp8CCSStB+bj81am7pXfKo2m3GIfXrUmy6d0wVER f9lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=PcSN9ShMcdae25z0ncAl7z4QQzYQwQoHD/MixpB3OUs=; b=N36aoSSpHmCPRN8hogkY2qIH+OJ1SnH2QLZi2P10+vTJqxvOVeUeBCBZSVv2vd5thJ CqphC3Rid2PS7AKPMjHsAlGjv1bgUQIjEH9i/88ITknjyoVocizQcEn7QYUOnKNTUV6k d0BqyFDjTpmjUprD15Icr1rvlOsPS1dSikEJ/34Bu1GJGY49ek8XAuWC47cnQeCNirVB VO50P0Ko4RiLvyXj4Gg3sV8S+2y/oa04NVqMEa3zBM21gVkWUtnkbrg2Vrfbwju1utdp JKTONzo5+iGxOUHB2b8qmWlt7u/lV3LAT8SokK1SfNdPj2eSYt19enqmFk+gcyx0I7Mb V81w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Nhj471Fr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r8-20020a2e94c8000000b00261d3bd0536si343954ljh.305.2022.09.08.22.12.03; Thu, 08 Sep 2022 22:12:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Nhj471Fr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229960AbiIIEst (ORCPT + 99 others); Fri, 9 Sep 2022 00:48:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40304 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229788AbiIIEsq (ORCPT ); Fri, 9 Sep 2022 00:48:46 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC6A8123EED; Thu, 8 Sep 2022 21:48:40 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id AA47F61E5D; Fri, 9 Sep 2022 04:48:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 77FD9C433C1; Fri, 9 Sep 2022 04:48:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1662698919; bh=0J6ER8fnpFHY39WsvpWQrzmPphu08JvaKTYLSCsE2Hg=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=Nhj471FrBLU3A3EN6xY82qO+CS7EigLtAFQjoed4e7kJlmYNbsyWx58NBcDcWid+C kpl5OUkyH4T1KLqbUBdoGbX1tHo5jzChTsJZhr63Y2a6JPOddewEf+EMoxk93bvuz9 NqGv5k6mcLo2uOReZLUpdQMNVueJVO1CH7VHOd9P1WHejMuUiLAWq1/eSAkVsNC3Fh xd5DtarFsGvOADus8UhKVpVH5D9jaRiIAJe/VLjr3kknWg2PAkKRdx+wB+RLNrdTTE S1pu4iFWorBwalJrPWhjEAwsV7cOngtqcJEVDb3sqUBFE54ruJIj9kp8cQq5SkvUdr AKq+U1uONwy/g== Message-ID: <95bd287b-d17f-fda8-58c9-20700b1e0c72@kernel.org> Date: Thu, 8 Sep 2022 21:48:35 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Subject: Re: [PATCH v7 00/14] KVM: mm: fd-based approach for supporting KVM guest private memory Content-Language: en-US To: "Kirill A. Shutemov" , Hugh Dickins Cc: "Kirill A . Shutemov" , Chao Peng , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-api@vger.kernel.org, linux-doc@vger.kernel.org, qemu-devel@nongnu.org, linux-kselftest@vger.kernel.org, Paolo Bonzini , Jonathan Corbet , Sean Christopherson , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H . Peter Anvin" , Jeff Layton , "J . Bruce Fields" , Andrew Morton , Shuah Khan , Mike Rapoport , Steven Price , "Maciej S . Szmigiero" , Vlastimil Babka , Vishal Annapurve , Yu Zhang , jun.nakajima@intel.com, dave.hansen@intel.com, ak@linux.intel.com, david@redhat.com, aarcange@redhat.com, ddutile@redhat.com, dhildenb@redhat.com, Quentin Perret , Michael Roth , mhocko@suse.com, Muchun Song , "Gupta, Pankaj" References: <20220706082016.2603916-1-chao.p.peng@linux.intel.com> <20220818132421.6xmjqduempmxnnu2@box> <20220820002700.6yflrxklmpsavdzi@box.shutemov.name> From: Andy Lutomirski In-Reply-To: <20220820002700.6yflrxklmpsavdzi@box.shutemov.name> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-10.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/19/22 17:27, Kirill A. Shutemov wrote: > On Thu, Aug 18, 2022 at 08:00:41PM -0700, Hugh Dickins wrote: >> On Thu, 18 Aug 2022, Kirill A . Shutemov wrote: >>> On Wed, Aug 17, 2022 at 10:40:12PM -0700, Hugh Dickins wrote: >>>> >>>> If your memory could be swapped, that would be enough of a good reason >>>> to make use of shmem.c: but it cannot be swapped; and although there >>>> are some references in the mailthreads to it perhaps being swappable >>>> in future, I get the impression that will not happen soon if ever. >>>> >>>> If your memory could be migrated, that would be some reason to use >>>> filesystem page cache (because page migration happens to understand >>>> that type of memory): but it cannot be migrated. >>> >>> Migration support is in pipeline. It is part of TDX 1.5 [1]. And swapping >>> theoretically possible, but I'm not aware of any plans as of now. >>> >>> [1] https://www.intel.com/content/www/us/en/developer/articles/technical/intel-trust-domain-extensions.html >> >> I always forget, migration means different things to different audiences. >> As an mm person, I was meaning page migration, whereas a virtualization >> person thinks VM live migration (which that reference appears to be about), >> a scheduler person task migration, an ornithologist bird migration, etc. >> >> But you're an mm person too: you may have cited that reference in the >> knowledge that TDX 1.5 Live Migration will entail page migration of the >> kind I'm thinking of. (Anyway, it's not important to clarify that here.) > > TDX 1.5 brings both. > > In TDX speak, mm migration called relocation. See TDH.MEM.PAGE.RELOCATE. > This seems to be a pretty bad fit for the way that the core mm migrates pages. The core mm unmaps the page, then moves (in software) the contents to a new address, then faults it in. TDH.MEM.PAGE.RELOCATE doesn't fit into that workflow very well. I'm not saying it can't be done, but it won't just work.