Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp2717189imi; Mon, 25 Jul 2022 06:33:35 -0700 (PDT) X-Google-Smtp-Source: AGRyM1s5fOfwxHZ1oSh5Vd46+JPKMwfl5aFLxGYSzErznloZ/VbbjKbaslp7uTZejSbv20cZa/Bg X-Received: by 2002:a9d:70cd:0:b0:61c:9245:fbf6 with SMTP id w13-20020a9d70cd000000b0061c9245fbf6mr4608992otj.75.1658756015013; Mon, 25 Jul 2022 06:33:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658756015; cv=none; d=google.com; s=arc-20160816; b=XY6nKHBPWJaY5CW7e/MptCsPr5NbVFCQCO9yXd0zC5AX/js8fw2265JDIgiB6n0Vgk FyqFZ6GgyW1y4zGUj8Yq66ECyTWeC0A0KUwmFUw52yaT+5XSVJa5ODRkYkVPzzdS11yP XkvuRd33ap1Lxjy7qasuy0IdyHmXKVdFEJbddekykUHryyE2xgdwgXggbV0Dqvv3SsXK 5MXXefT8Eamv74MoCDrz1GOhzZU6XDBHStEuHiYKuYaFRG4AxPnGIUCNri1raYB2UuB7 RiuiDr0/B1g6088ijhupfZdgIfdzQmjqz53+ADPRt9Sl3ALwasuJBmQ3RejGsKzqJgAS A0iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Cr161pBuucIWNXW81GJsrn3Xjt5tM4OqXadtfxWWew8=; b=Zs4FUXPHFlbNeTKE325ZF07aBvOHUa4AGNp4Ijs80mLTugFfvdf4ViJqlwbxOYg3eQ W4j9G5HXFJrI1ZO+r5V7i/32RuS3HfGXcx7epKYz8M55DZu/REl2ZBzKa0qcNlJM+wV+ hG/IzkcUif61+jrxbwotlyxJCMJ5HzGCFoIR1yJk7zOFhv1tbKcMZSjctPrNY9Tf+u9c omOKyRUSP+Uxnc0hNz06hQ8Ml4lGSupQmOps/6qIJLLPicpC0x59lY7HBOj8XqXZ0Tjg x4iLkgK5U4qG+MeM9hiwFqHgTPKry9qEEq5N9boII9efDDH6YFXFKmBHX5i76zD2bmJn hwOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NTlzQhT+; 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 l22-20020a056830269600b0061c3655b836si11799595otu.220.2022.07.25.06.33.14; Mon, 25 Jul 2022 06:33:35 -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=NTlzQhT+; 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 S235175AbiGYNAi (ORCPT + 99 others); Mon, 25 Jul 2022 09:00:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232202AbiGYNAg (ORCPT ); Mon, 25 Jul 2022 09:00:36 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5F9C1FE7; Mon, 25 Jul 2022 06:00:35 -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 0848060B08; Mon, 25 Jul 2022 13:00:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3126DC341CD; Mon, 25 Jul 2022 13:00:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1658754034; bh=Z2zzzoZrRO4S3EO/OVriM7FNu33t82mtKGNUW8yxdMo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=NTlzQhT+8azuC/qm812aifg/DmWh2eB2EqFOBkKQdycA2qCFLnrbnSv+IGxscEV7w VxuRZ5zyIUkwMh+cu4ohMYZvn81JRF5aHk7+SlhD6qJAxylWrauDExuot+Ct5iSgb6 TmLxAzU/jxOVaHVX8LyXQ0Bz62L8r4ZKJWS9tELLxLeInMTkttTlDqUIJVou8vzAEY Do+9YAz9S7qmUtM+Wy+8ThqHEXu0U2xMoh4hvRpG/jVBLZdJye1mIAzOCH0NJJdvx7 Nl79BRb4YBrpvRbqeW2KhqzG/mI30Sff/868k5qahgPtSNCL69+Megu+Ec7MWN3+G/ BsrRDWtE/NOow== Date: Mon, 25 Jul 2022 16:00:14 +0300 From: Mike Rapoport To: Borislav Petkov Cc: Dave Hansen , "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 , David Hildenbrand , 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 Subject: Re: [PATCHv7 02/14] mm: Add support for unaccepted memory Message-ID: References: <20220614120231.48165-1-kirill.shutemov@linux.intel.com> <20220614120231.48165-3-kirill.shutemov@linux.intel.com> <707ca113-c2a2-8fe2-a22c-5be13adc7bb4@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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 Mon, Jul 25, 2022 at 02:23:20PM +0200, 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". An application in the VM can do mlock() or mmap(..., MAP_POPULATE, ...) and this will essentially force acceptance of that memory. But there's no sysctl or something for that. > Or does that not make any sense from mm perspective? > > -- > Regards/Gruss, > Boris. > > https://people.kernel.org/tglx/notes-about-netiquette -- Sincerely yours, Mike.