Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp2691884imi; Mon, 25 Jul 2022 05:55:34 -0700 (PDT) X-Google-Smtp-Source: AGRyM1t1pSfn/0cHSbP/b8mNALKjoZxuuBrlV/1coocrvYUDzB13/7oG1bDXckrwLgKL4vt0oYkR X-Received: by 2002:a17:90a:de12:b0:1f0:f213:cb9d with SMTP id m18-20020a17090ade1200b001f0f213cb9dmr14404023pjv.207.1658753733957; Mon, 25 Jul 2022 05:55:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658753733; cv=none; d=google.com; s=arc-20160816; b=fDflfNAq4C0xY+dzxbr8Kkt63Y1keVwepC/JcuTCwTcWGOMQm63p54T/S7lMhRo7Ds pzQite5srP1XX6XDgSLsT9L+cfNEyyiSGpqNObzIAaxCaptWl1i0r0eFI1XHH7gpz7cF p9Jg0qbzqBTsbbKrI2GDIwkmjTkd7g77hC9kdHCRh5/VM10X7Gk2ijiTGVNkf+7CCy2D v1CFptXl3hFTeWMxrMzV14+isaIfKi98PhKF/45nSUiLaQN7e8Hkku2FsaiRNSLnwTkS fVBpVUol8IrlIhNTsU6lQ0Z8r0UPBEPnlrd72GiTyx6lmPVKOCRrDwK+MrpBdvAjvAuk BDzw== 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 :organization:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:dkim-signature; bh=3WHFuKmZPQedoN55ZoH0FtL+rcxDT0vItFUzM4he2I8=; b=vXaektdoTZaWZGZQyrD6G5lmd0cUsmxP5xhenTehHD6TzgJdIBw+TkPN86UZ2jZGnE DdH3RbSxeJqTGsmODd+kP6tb0nJHommhqz7DqnBgkN1mfoJXmgBk5mXFOFeiDmm+SRlk pJ7al/WFlkT9XPy2W6wkBt5fN8MABkQIIlz1nv+lWA7ionueLqAcePa/Hnil0TJVfOSU khzglCVZlp8+f72454wXQucCfnTnUnA51SoaqGxc00fXU486/A5cGKrRT0648vCp8+dQ RxeeoWYT9uCaqdyUSe9fe4I6wN1/K1vja5ztLrgFXaaTV6UWqP93YDmGwyVhUvQ/sC+r 6IBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=XdVuorXc; 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=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h19-20020a056a00219300b0052840d91b55si16620320pfi.133.2022.07.25.05.55.18; Mon, 25 Jul 2022 05:55:33 -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=@redhat.com header.s=mimecast20190719 header.b=XdVuorXc; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234859AbiGYMjG (ORCPT + 99 others); Mon, 25 Jul 2022 08:39:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234169AbiGYMjE (ORCPT ); Mon, 25 Jul 2022 08:39:04 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 36AA5BC98 for ; Mon, 25 Jul 2022 05:39:03 -0700 (PDT) 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-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-27-NdnxX3kONx6504fm3bNVgw-1; Mon, 25 Jul 2022 08:39:00 -0400 X-MC-Unique: NdnxX3kONx6504fm3bNVgw-1 Received: by mail-wm1-f70.google.com with SMTP id n30-20020a05600c501e00b003a3264465ebso5821606wmr.1 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=tn7o24noEcpo/dtAP6JE+bpqPGGTu5cmQEDPys0X3jIUpGlSuEyVeDnXF8p8SyIyPD zFm0imwTXUc4qa4ChazkbvFJz2rdEZ6CbB4C6qr10rRKSj64Sp8UpckctAzs65BUNLSL AAEfCvCy3rjlPeagk2fubnBqxZeoI1dPo8xLgJ5hQLt9YjD7CSZ3YXUlvbUY/bE7iW0o 4OuN46qmpEBXi3cCrDyS3NE63Nt2/9hCk2hWtefWD+O7mVsbWSOrDWnLtSevzn0pfhJA QXK/zF6u2sUrDNp7VXeY96qLZb7OwdQfAPfDkMH/7gZccixoawEkpZ7L9DAVkAREPnMF j8vQ== X-Gm-Message-State: AJIora9hQAqFGM8E13EyderiRJ2IvATaJptwJsWYJEAsN9C8OUbwLEfb 7xXOXnSuM0nIDAFQsM5c8y4Re0NC/fAKE7VUtAJ/mAikq1G781GDi7kWEJ6eVjk6GpyLVHtdc8Q QTHyaIfwtzes3RmSJJSruCWQD X-Received: by 2002:a05:600c:1986:b0:3a3:490b:1fd4 with SMTP id t6-20020a05600c198600b003a3490b1fd4mr7365133wmq.140.1658752739747; Mon, 25 Jul 2022 05:38:59 -0700 (PDT) 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 Content-Language: en-US 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: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.4 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_LOW,SPF_HELO_NONE,SPF_NONE 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 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