From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8BBFDC00140 for ; Sun, 21 Aug 2022 10:29:15 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9C5E96B0073; Sun, 21 Aug 2022 06:29:14 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 974E66B0074; Sun, 21 Aug 2022 06:29:14 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 815A08E0001; Sun, 21 Aug 2022 06:29:14 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 7008D6B0073 for ; Sun, 21 Aug 2022 06:29:14 -0400 (EDT) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 2DC3C1206F4 for ; Sun, 21 Aug 2022 10:29:14 +0000 (UTC) X-FDA: 79823227428.04.F5596E3 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf31.hostedemail.com (Postfix) with ESMTP id 40C4520136 for ; Sun, 21 Aug 2022 10:28:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=ezqnpfSoqTQDMJ+hJHVpOcv6CdCxoRGL+MI+YKi2ajc=; b=oGft0gECLBoMj2UBuNjBRRw7oU +dq00PAmbDXUBvlm8/tj+3wvQ6+u1mI4tCmpI7ekjaZJY5bZRNO9OebH9SJpV1ysh/OWtfztRfWPW oh7BrM3UcOp9ibf9eSMPU5DoNPWCirAlzoF7UBdHCRQtmm6dE/aZytFO5kBG+bAYbqLdyYZzrVtt/ iuZP3zYaHC4+P7CXpDkHhx26k0MpnTHE/dEowsrIT+sGbKv23kjGfdNLUtoruLSmY1Y3DtZhd/9Hl 3LYOd+8SlRhwWalnWFB/NWtwuYs86Tc9tyA9RmJoFdeb0dwyoEDgnWuoUSo1B+PY04MuuTWMM54Av EsSC0QFw==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1oPiBE-00D7rG-Sc; Sun, 21 Aug 2022 10:27:44 +0000 Date: Sun, 21 Aug 2022 11:27:44 +0100 From: Matthew Wilcox To: 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 , luto@kernel.org, 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" Subject: Re: [PATCH v7 00/14] KVM: mm: fd-based approach for supporting KVM guest private memory Message-ID: References: <20220706082016.2603916-1-chao.p.peng@linux.intel.com> <20220818132421.6xmjqduempmxnnu2@box> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: ARC-Authentication-Results: i=1; imf31.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=oGft0gEC; spf=none (imf31.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1661077688; a=rsa-sha256; cv=none; b=xxdq6Vq7QKrvVQaPqRKqG4RusoVEoOq7bx6tqJWtis8e2UuDpMY2Ke6eLLANv/WM3b8ALW DWJGpsojxTDqDych438JA66sdFMgD/ZXV5hBFrkHAtsmxHB3VG9d094x3SeeQ8BJ4x1zap gDj4FisJm/lX5VTD0K4Q6mcquBRa9Y8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1661077688; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=ezqnpfSoqTQDMJ+hJHVpOcv6CdCxoRGL+MI+YKi2ajc=; b=tFj1VMtNhJA9Ki5va59aUFVjlTfOVyvyk18rLU7PL3LhjHbFIaR5E4tX9jSsXe8B/Q4nGF 8n8tT0H4bas3FZdMmVAttUWI9e8mpkR5C9SnmeF3OfIBfMRVD/XePBRM9eTfijhN/jGUnb RL9Fnx/6p+XQ8xVxUHpQ7kTUYkFGO3k= Authentication-Results: imf31.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=oGft0gEC; spf=none (imf31.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none X-Rspam-User: X-Rspamd-Server: rspam07 X-Stat-Signature: patcw5518kabz37ki1r5e7dg3iyant4h X-Rspamd-Queue-Id: 40C4520136 X-HE-Tag: 1661077687-892378 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, Aug 18, 2022 at 08:00:41PM -0700, Hugh Dickins wrote: > tmpfs and hugetlbfs and page cache are designed around sharing memory: > TDX is designed around absolutely not sharing memory; and the further > uses which Sean foresees appear not to need it as page cache either. > > Except perhaps for page migration reasons. It's somewhat incidental, > but of course page migration knows how to migrate page cache, so > masquerading as page cache will give a short cut to page migration, > when page migration becomes at all possible. I haven't read the patch series, and I'm not taking a position one way or the other on whether this is better implemented as a shmem addition or a shim that asks shmem for memory. Page migration can be done for driver memory by using PageMovable. I just rewrote how it works, so the details are top of my mind at the moment if anyone wants something explained. Commit 68f2736a8583 is the key one to look at.