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 69311C433F5 for ; Wed, 13 Apr 2022 14:39:37 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B24796B0072; Wed, 13 Apr 2022 10:39:36 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id AABA46B0073; Wed, 13 Apr 2022 10:39:36 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8FE766B0074; Wed, 13 Apr 2022 10:39:36 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.27]) by kanga.kvack.org (Postfix) with ESMTP id 7C1406B0072 for ; Wed, 13 Apr 2022 10:39:36 -0400 (EDT) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay12.hostedemail.com (Postfix) with ESMTP id 49212121E6D for ; Wed, 13 Apr 2022 14:39:36 +0000 (UTC) X-FDA: 79352114352.02.4BFCCD4 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf22.hostedemail.com (Postfix) with ESMTP id B363EC0004 for ; Wed, 13 Apr 2022 14:39:35 +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 dfw.source.kernel.org (Postfix) with ESMTPS id D336061C36; Wed, 13 Apr 2022 14:39:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7A7A8C385A4; Wed, 13 Apr 2022 14:39:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1649860774; bh=8yJB3RTfMHAvG+qVCpJGHNnXUQN/4L5d65PERRX6VvI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=R6UmbR9Nnkyyb0sa6mU+ScjeQj6ySSju0otK3fB765GF5jbY38UmFbxK8+CO3WWmv F90FPJTu6x0c5EdcRloalAL0l4kvi4dhG77+C7x2aoN2CGYa6EA/STzOwkBp+H1/bI /dxmdZQhK/FfXWeHKOiRPHwA8AtpSvBl86ja5Y46Vm/w1prNZkBZoE3Ds4VCn5CFtq v+/MnU4bLFcgdCigJu1Yg2hJWLSN6KwcZQ+9ZG0DtRkfjHjUMcvOE04QbRbZ0gYAeB /XCJIHJAHtZ9YjazAXQfpXUbK9a31JvULtIkqEwSTHTpvcazlHD76suMOabluS2C0x 7aPTRxcwuEDKQ== Date: Wed, 13 Apr 2022 17:39:20 +0300 From: Mike Rapoport To: David Hildenbrand Cc: Dave Hansen , "Kirill A. Shutemov" , Borislav Petkov , 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 , Brijesh Singh , 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: [PATCHv4 1/8] mm: Add support for unaccepted memory Message-ID: References: <20220405234343.74045-1-kirill.shutemov@linux.intel.com> <20220405234343.74045-2-kirill.shutemov@linux.intel.com> <93a7cfdf-02e6-6880-c563-76b01c9f41f5@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Stat-Signature: hbnc9n3y7bbqpfdccqz7unn8edis6g9s Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=R6UmbR9N; spf=pass (imf22.hostedemail.com: domain of rppt@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=rppt@kernel.org; dmarc=pass (policy=none) header.from=kernel.org X-Rspam-User: X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: B363EC0004 X-HE-Tag: 1649860775-483210 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 Wed, Apr 13, 2022 at 12:36:11PM +0200, David Hildenbrand wrote: > On 12.04.22 18:08, Dave Hansen wrote: > > On 4/12/22 01:15, David Hildenbrand wrote: > > > > The other option might be to tie this all to DEFERRED_STRUCT_PAGE_INIT. > > Have the rule that everything that gets a 'struct page' must be > > accepted. If you want to do delayed acceptance, you do it via > > DEFERRED_STRUCT_PAGE_INIT. > > That could also be an option, yes. At least being able to chose would be > good. But IIRC, DEFERRED_STRUCT_PAGE_INIT will still make the system get > stuck during boot and wait until everything was accepted. The deferred page init runs multithreaded, so guest with SMP will be stuck for less time. > I see the following variants: > > 1) Slow boot; after boot, all memory is already accepted. > 2) Fast boot; after boot, all memory will slowly but steadily get > accepted in the background. After a while, all memory is accepted and > can be signaled to user space. > 3) Fast boot; after boot, memory gets accepted on demand. This is what > we have in this series. > > I somehow don't quite like 3), but with deferred population in the > hypervisor, it might just make sense. IMHO, deferred population in hypervisor will be way more complex than this series with similar "visible" performance. -- Sincerely yours, Mike.