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 66751C433EF for ; Mon, 25 Jul 2022 12:39:04 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 97730940015; Mon, 25 Jul 2022 08:39:03 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 926DB940011; Mon, 25 Jul 2022 08:39:03 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7A242940015; Mon, 25 Jul 2022 08:39:03 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 6AA0D940011 for ; Mon, 25 Jul 2022 08:39:03 -0400 (EDT) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 3391380467 for ; Mon, 25 Jul 2022 12:39:03 +0000 (UTC) X-FDA: 79725576966.22.0E40878 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf31.hostedemail.com (Postfix) with ESMTP id 884EC2009A for ; Mon, 25 Jul 2022 12:39:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1658752742; h=from:from: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:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3WHFuKmZPQedoN55ZoH0FtL+rcxDT0vItFUzM4he2I8=; b=XdVuorXcX3UyPmS6Mpnf0VZc2RmgGmB9OIc+vj3gqOyDQJlLHIT1DLzffEtVFoDl3+ekKe PPUKhHKPrSxYttXJ2lVB2tBlCENlOjxtf8bG+EnEpINAtqXuZCVJFYi7Bwi8DKHOkbAaav aBRaNvU2qjsThva9Zx+16hz2AFPjeYo= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-447-3RtT_Fm_OQev4HRZ2TJywQ-1; Mon, 25 Jul 2022 08:39:01 -0400 X-MC-Unique: 3RtT_Fm_OQev4HRZ2TJywQ-1 Received: by mail-wm1-f72.google.com with SMTP id ay19-20020a05600c1e1300b003a315c2c1c0so8634506wmb.7 for ; Mon, 25 Jul 2022 05:39:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:organization:in-reply-to :content-transfer-encoding; bh=3WHFuKmZPQedoN55ZoH0FtL+rcxDT0vItFUzM4he2I8=; b=dqu+Wv7sIwRk5jBftPCzO0BkCtt/5ugjZgFgjlVz3Aa6zLU/2ed/gAt4Yom8FtGTlV SXb1BblCK/bUF106Hf83Ahj1hpDZHyW5wESNrwvPI7wb8EUIx4P2n2F3QqEOGkgSBKIG J0aPVc1tBCwHtfYCH5nhX5z+HajXj+CrcgKpWlqf2JMqqmoBX099XZMXE1QXsT+NxakY qj4vuzjPyg2/H3/L1xI5hzLx8YU8oEi3kNswq4LdArjTdSyDMcZH5sDpGSbHu7q7W7CB YBmcJulsLyTJNAZMDZo+wP4DsrP4JgaUM4y9FHeqvgsu81min9Owimqc7bYyPqjesiXg IPfw== X-Gm-Message-State: AJIora+jyHMiJVf+E5GsWhNap5kWwLcS96ZJ5zX/iVkRbfZBctpllZtq Ws3Ml9U9V1IKbqQc+nIT5itnu806CPSJe8Wlu4vRuXu3wtmmlU1q5lhVXIWp2aCW2Jfmcnqn68J CLCzqebqrYns= X-Received: by 2002:a05:600c:1986:b0:3a3:490b:1fd4 with SMTP id t6-20020a05600c198600b003a3490b1fd4mr7365134wmq.140.1658752739748; Mon, 25 Jul 2022 05:38:59 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vTnXfTssXHtYtWUqP9z+lS8oior8tLmN08lGBELo1Up+/gD5Avnva+lrhKtPOFyww/a8mGKA== X-Received: by 2002:a05:600c:1986:b0:3a3:490b:1fd4 with SMTP id t6-20020a05600c198600b003a3490b1fd4mr7365095wmq.140.1658752739261; Mon, 25 Jul 2022 05:38:59 -0700 (PDT) Received: from ?IPV6:2003:cb:c704:8c00:eee4:63f0:cef2:5ac0? (p200300cbc7048c00eee463f0cef25ac0.dip0.t-ipconnect.de. [2003:cb:c704:8c00:eee4:63f0:cef2:5ac0]) by smtp.gmail.com with ESMTPSA id r17-20020a5d52d1000000b0021d68a504cbsm11691804wrv.94.2022.07.25.05.38.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 25 Jul 2022 05:38:58 -0700 (PDT) Message-ID: <7d664831-a78c-4a4f-5bd6-f0e04463ca7c@redhat.com> Date: Mon, 25 Jul 2022 14:38:57 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCHv7 02/14] mm: Add support for unaccepted memory To: Borislav Petkov , Dave Hansen Cc: "Kirill A. Shutemov" , Andy Lutomirski , Sean Christopherson , Andrew Morton , Joerg Roedel , Ard Biesheuvel , Andi Kleen , Kuppuswamy Sathyanarayanan , David Rientjes , Vlastimil Babka , Tom Lendacky , Thomas Gleixner , Peter Zijlstra , Paolo Bonzini , Ingo Molnar , Varad Gautam , Dario Faggioli , Mike Rapoport , marcelo.cerri@canonical.com, tim.gardner@canonical.com, khalid.elmously@canonical.com, philip.cox@canonical.com, x86@kernel.org, linux-mm@kvack.org, linux-coco@lists.linux.dev, linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org, Mike Rapoport References: <20220614120231.48165-1-kirill.shutemov@linux.intel.com> <20220614120231.48165-3-kirill.shutemov@linux.intel.com> <707ca113-c2a2-8fe2-a22c-5be13adc7bb4@intel.com> From: David Hildenbrand Organization: Red Hat In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1658752742; a=rsa-sha256; cv=none; b=Mw8I1j6fEOB7zTe2P5NqFrC6D03dDrG5c/g/l5Tc7eM21rCnuUCV9tyrwVPqL8bteMUGT2 hrQCL5w3bOkd2G1C+VmpDCe4sv1hqy8WYZI3QgWOdbGIl6W9FKbl9rjNn52YBEb4fRnr0w Lvd8lcteM5wFw6wPgxgy3oL0LY5DCl8= ARC-Authentication-Results: i=1; imf31.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=XdVuorXc; dmarc=pass (policy=none) header.from=redhat.com; spf=none (imf31.hostedemail.com: domain of david@redhat.com has no SPF policy when checking 170.10.129.124) smtp.mailfrom=david@redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1658752742; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=3WHFuKmZPQedoN55ZoH0FtL+rcxDT0vItFUzM4he2I8=; b=QGkfqlTrpDTydiWlsw423hOqFhnoyAMSPAEm8ID9LDKRqu3p8DDcyv0XPgKlrSm5E0UjcY BqF9IJZVEqxV818k0KM0mDCVAPGeerYhrr+VPKImgCGYDSGamPAV5dq6zRh1TQJI9ty76m jGdOQWLqu5H8bYnTKIg7gd2L8eBtUD0= Authentication-Results: imf31.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=XdVuorXc; dmarc=pass (policy=none) header.from=redhat.com; spf=none (imf31.hostedemail.com: domain of david@redhat.com has no SPF policy when checking 170.10.129.124) smtp.mailfrom=david@redhat.com X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 884EC2009A X-Stat-Signature: nzsz3hc1b76c4c5e79fcf4ai6msn6jm3 X-Rspam-User: X-HE-Tag: 1658752742-123716 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 25.07.22 14:23, Borislav Petkov wrote: > On Fri, Jul 22, 2022 at 12:30:36PM -0700, Dave Hansen wrote: >> Sure does... *Something* has to manage the cache coherency so that old >> physical aliases of the converted memory don't write back and clobber >> new data. But, maybe the hardware is doing that now. > > Let's hope. > >> Yeah, that two-tier system is the way it's happening today from what >> I understand. This whole conversation is about how to handle the >4GB >> memory. > > Would it be possible to pre-accept a bunch of mem - think "pre-fault" - > from userspace? > > I.e., I'm thinking some huge process is going to start in the VM, VM > userspace goes and causes a chunk of memory to be pre-accepted and then > the process starts and runs more-or-less smoothly as the majority of its > memory has already been "prepared". > > Or does that not make any sense from mm perspective? > The less core-MM code to handle unaccepted memory the better. Meaning, that any kind of additional pre-acceptance (in addition to what we have here) needs good justification. -- Thanks, David / dhildenb