Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp1394064pxb; Thu, 14 Apr 2022 05:21:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzhl2z8Se3Cvc77ARo+ynTzEMJSdo2+4PLTma0GF/YFkKHhjAPR1D/puBhz1wNBJETsXxsE X-Received: by 2002:a17:902:7201:b0:158:8fa1:51f1 with SMTP id ba1-20020a170902720100b001588fa151f1mr11426718plb.138.1649938887206; Thu, 14 Apr 2022 05:21:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649938887; cv=none; d=google.com; s=arc-20160816; b=VNvUXRt6hn0H4IC93x4MyAmczdHSY0+QnPvTlDcmT/M6hDllkUnScdIZJaXT0hzpvf watiZE5SkkepowsViXnIvyDaeOGi9aSf8XeNRoRXq/zbtWNgSzYWDHOwTfsh+z2QjQCr 6/TSlVeiCeOLZVAiU76TPajsXicI8Jn/JpJc4VCKvPSyVtuDACJ1imbRmm6HO+Z9jLdy GpyLB63m/LqyWYpiCKJvoJhs+lnh+kDM1VG89a6zf4/frqxo3d7XBPc1fPMTpE6hejRL xFQzsX9vLQnYjlzilbnCL2CCUYjwTlgQGuKd9OaMrjI00eYRwfaWvwkHt83x7m9uf8vI 48Cg== 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=r79n0ppKZnRdhvtXk/IJ0F7xGcLMEV3WuUscfVnh3F4=; b=DoWNZ4Y3yv44bZnmzMZL/q/RoypxH9cqEA+q4xdvK3TZ/Dc1co6g8lfPa2nE2vVaKk UjcX6pERY6kAVtZHw6aL1PWgL9CJZ1WgheUG41RulNSVoPZZfobKpN0ltaWquzm2Qghy +QMkbuHPyp8c7id1JbOcTKq4ETvuQ5f9zVfynrwGLpv4uY6kMp1e3LH3Z0UOhYSXdVi+ 1a+I7U/nQtzMX8BsfTGMRyt4TOGYm7gP7jxgkT1yQPSNr73Iz2xtOzQSbK6gH7gOsIGO 7qQAzRXbw+bhtsQgtGFdqe+T/HiaSFbj+/y3C9RKL/H5C8Hk51SQZCyrcttSMy8RURZV A08g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=R6UmbR9N; 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 t16-20020a170902e85000b00153b2d1651fsi18528620plg.295.2022.04.14.05.21.15; Thu, 14 Apr 2022 05:21:27 -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=R6UmbR9N; 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 S236158AbiDMOmA (ORCPT + 99 others); Wed, 13 Apr 2022 10:42:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230492AbiDMOl5 (ORCPT ); Wed, 13 Apr 2022 10:41:57 -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 38A0BFD1C; Wed, 13 Apr 2022 07:39: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 D120360DEA; 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-Spam-Status: No, score=-7.1 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,T_SCC_BODY_TEXT_LINE 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 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.