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 DAF9AC433EF for ; Mon, 25 Jul 2022 13:00:42 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5FD04940017; Mon, 25 Jul 2022 09:00:42 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5AC7A940011; Mon, 25 Jul 2022 09:00:42 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4747A940017; Mon, 25 Jul 2022 09:00:42 -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 368C4940011 for ; Mon, 25 Jul 2022 09:00:42 -0400 (EDT) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 079A51C642A for ; Mon, 25 Jul 2022 13:00:42 +0000 (UTC) X-FDA: 79725631524.01.D4B4D7C Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf21.hostedemail.com (Postfix) with ESMTP id 0DDBF1C00BF for ; Mon, 25 Jul 2022 13:00:37 +0000 (UTC) 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 ams.source.kernel.org (Postfix) with ESMTPS id D36B6B80EBA; 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: ARC-Authentication-Results: i=1; imf21.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=NTlzQhT+; spf=pass (imf21.hostedemail.com: domain of rppt@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=rppt@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1658754038; 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=Cr161pBuucIWNXW81GJsrn3Xjt5tM4OqXadtfxWWew8=; b=HBToQrz9wRfNw5Mze0aN1Kg6/I24p+sERxsYfz5SObSDGdCPLC2GlrZEQtsEnFmbx/giko GQfmY1KJXR84HyQ8fFBuTge2iu9MTFHu2ZqVM4u+ChPbgX/aUhywV+RHNoH0YONDTHSnTq QSo/bXee7abJzCpTZXzr9nW51guFML0= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1658754038; a=rsa-sha256; cv=none; b=nklOfXVm96CJSHiMXuIWkQh+pAmIa/BurgGk/8UYLN+hONMMft/rq6XmGlsnqNEdzkGgw9 EaZY2k9G3DOyFuN6Pf66AZePiWUIlN2EM+2daanh8S4TTZEcZBFY7aTZ9tQNZTdoy2vnK9 zOWZOY+43T9jEqOJV3Zc8zRH3cwb06s= Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=NTlzQhT+; spf=pass (imf21.hostedemail.com: domain of rppt@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=rppt@kernel.org; dmarc=pass (policy=none) header.from=kernel.org X-Rspam-User: X-Stat-Signature: aw5be6fcpyhxsfpe7r1axke3tsczu5u9 X-Rspamd-Queue-Id: 0DDBF1C00BF X-Rspamd-Server: rspam02 X-HE-Tag: 1658754037-87813 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 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.