Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp798604pxb; Wed, 13 Apr 2022 12:38:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxgbvXiCbOFeddk7pMI0Q0adZklq5fjy1v3CFnubKJOOj4F6dhl9f0kCzPxUq8Vjr29e2pc X-Received: by 2002:a63:495b:0:b0:399:8cd:81de with SMTP id y27-20020a63495b000000b0039908cd81demr35211429pgk.508.1649878689357; Wed, 13 Apr 2022 12:38:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649878689; cv=none; d=google.com; s=arc-20160816; b=Fuca5sdbRGis46Q44+oo7kxNeZ/drHf+lP7U4ggEn6ZMGsFdJgCSCElET7Zx/OcAAg TXerjFoR6WFNtNjAlKWQl6XGYeNwxNhJse+6dQAD22WRfJmBX9H9GEOC+byNcQOrv0JQ rE5GjKfdEa7h4gqNqhKzSBd2WFMA64mcpUQ7dbBwrFuX8S0zxI90x85C60Fs1DDkkLBu 6ePmLjql9qL5oioUIe6IKZscWYjV+5Z+4PAOWS/eIcjFYj9BYyQP6NaxJiikxKuxzFCK GhHV+GSkJVY5F98e4cssZ92rd4+JY9MpNsBEURKfBFFqQnoL5bX5InYVZCCexQEQIwDs IC/Q== 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=QOkajocQ8odh3i+hVeTJ63TIENzeAVOjDB6rWovHQzA=; b=TuQvSZQ15+Dg4vSv9iLoT6R8pJJx1mPOqyAwkSoYC/hsOwpNhIftcpdpqamACoXMwu pehRy23VEUpLiLaZFUXyNkqIZMjjvk4SRAyYhZo7rb5b2NT0nckpNIm1ZGqpK46grlA8 7r8HTbCE5wBUEm9sMZgrm+jP3QLR5vnkiFUMdCuB4cfTd/4i2iGmzPzTM9GummSyeH/5 NvXMrLmqYthYNb1b6lQAAJn95XOiQXWTq/bCu82dpon9CEqm++PJU0IeDM3WENsIeowM Rvk35z9erupvxgHXxnmkMaVrpaK/Qb5U1JQnKZXN5BYHHkf2YuoUI7/L78JZnYZwvm1N Rs3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=UHIRHKda; 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 j184-20020a638bc1000000b0039dafff029fsi3009032pge.447.2022.04.13.12.37.53; Wed, 13 Apr 2022 12:38:09 -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=UHIRHKda; 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 S236776AbiDMQKP (ORCPT + 99 others); Wed, 13 Apr 2022 12:10:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37498 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235063AbiDMQKN (ORCPT ); Wed, 13 Apr 2022 12:10:13 -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 AE2EB66611 for ; Wed, 13 Apr 2022 09:07:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1649866070; 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=QOkajocQ8odh3i+hVeTJ63TIENzeAVOjDB6rWovHQzA=; b=UHIRHKdaNGk4SBrBx7HwHJXCuwjgGgSa/Vw0YYtzSnCRFsNgcqSfOw2rYwtmfv/COUkxKr d+eBqd23BIB+AcbGQwIHN7FwHpXQcDDYiBRKYhCIi66AvbmgYXebfIZ03gMI5BegmHRUpG OnY+xppIf9JF5ZUlBtbSwDOGZwXfKXI= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-629-C_txJ6NDNtaGFnmpNjTvKg-1; Wed, 13 Apr 2022 12:07:49 -0400 X-MC-Unique: C_txJ6NDNtaGFnmpNjTvKg-1 Received: by mail-wr1-f72.google.com with SMTP id t15-20020adfdc0f000000b001ef93643476so501809wri.2 for ; Wed, 13 Apr 2022 09:07:49 -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=QOkajocQ8odh3i+hVeTJ63TIENzeAVOjDB6rWovHQzA=; b=4dvtCI6YcNc83CgmpaYhqRiZNLqbIB16tN0HKKHn61JtMwYqgDRq0jO7vR6TQHn6kC h5jMeSosuJCS2uJhXFb9M63F8D1G3qJw8IQUIqvS9/mn3jQfwcEajp/q2ovcsI3Ao2i4 Z1l5A4xSI4+rrkQmXNUFv7r93Yw2RIsOyVjwdwLJkEp0McSuuRZ0oe+cOLHzacAJGtV8 4nX4PkmtD6jJHC8Qe38xmwE3PeN0frAFRP0kaFvs+gw9WNZ45wJM0LmS4HtIgvVJLTz2 qMwQ4KsMZHeg9njvi2zT6jkLBt+sMc3+8dnLSgkFwwdZIOvoWNa4nyv+kFSqiibxXLZf 6Rkg== X-Gm-Message-State: AOAM5305BHzpxJYA4xBiXbARuXlCFOkhBtv5q/qgc+c7gdgBNDcS7VPx pv79Xybej1TNC5msiEqgSOZNCYMN1KKedmCo+eGaMTTR/R3n5Mo4VGWKgW0Z2lBs/2BHn0fH6KL dhQbpGNh3EkbVVqh10G4DhdPv X-Received: by 2002:adf:eb86:0:b0:1e6:8c92:af6b with SMTP id t6-20020adfeb86000000b001e68c92af6bmr33002780wrn.116.1649866068383; Wed, 13 Apr 2022 09:07:48 -0700 (PDT) X-Received: by 2002:adf:eb86:0:b0:1e6:8c92:af6b with SMTP id t6-20020adfeb86000000b001e68c92af6bmr33002738wrn.116.1649866068071; Wed, 13 Apr 2022 09:07:48 -0700 (PDT) Received: from ?IPV6:2003:cb:c704:5800:1078:ebb9:e2c3:ea8c? (p200300cbc70458001078ebb9e2c3ea8c.dip0.t-ipconnect.de. [2003:cb:c704:5800:1078:ebb9:e2c3:ea8c]) by smtp.gmail.com with ESMTPSA id l126-20020a1c2584000000b00387d4f35651sm2895911wml.10.2022.04.13.09.07.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 13 Apr 2022 09:07:47 -0700 (PDT) Message-ID: Date: Wed, 13 Apr 2022 18:07:46 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.6.2 Subject: Re: [PATCHv4 1/8] mm: Add support for unaccepted memory Content-Language: en-US To: Dave Hansen , "Kirill A. Shutemov" Cc: "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 , Mike Rapoport , 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: <20220405234343.74045-1-kirill.shutemov@linux.intel.com> <20220405234343.74045-2-kirill.shutemov@linux.intel.com> <93a7cfdf-02e6-6880-c563-76b01c9f41f5@intel.com> <20220413113024.ycvocn6ynerl3b7m@box.shutemov.name> 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=-4.1 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,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 13.04.22 17:36, Dave Hansen wrote: > On 4/13/22 04:30, Kirill A. Shutemov wrote: >>> 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. > ... >> Frankly, I think option 2 is the worst one. You still CPU cycles from the >> workload after boot to do the job that may or may not be needed. It is an >> half-measure that helps nobody. > > Let's not be too hyperbolic here. "Worst" is entirely subjective and it > totally depends on your perspective and what you care about. Right. Some people might want to start their workload as soon as the pain is really over. Some might want to have a functional system before that, others might not care. > > There are basically four options: > > * Accept everything in early boot > * Accept with deferred page free > * Accept with kthread after boot > * Accept on demand > > and four things that matter: > > * Code complexity > * Time to a shell prompt > * CPU/Memory waste > * Deterministic overhead > > Did I miss any? Nothing that comes to mind. > > News flash: none of the options wins on all the things that matter. > We're going to have to pick one (or maybe two). I'm also not horribly > convinced that there's a problem here worth solving, especially one that > requires surgery in the core of the buddy allocator. > > This is essentially making a performance argument: it takes too long to > boot if we go with a simpler solution. Yet, I haven't seen any data. I > think we need to go with the simplest approach(es) until there's some > actual data to guide us here. Simplest meaning: accept everything during early boot and don't touch core-mm/buddy code, correct? > > Here's another way to look at it: > >> https://docs.google.com/spreadsheets/d/1Fpv0Yp0CTF5_JXHR2pywvNtImTwUVGTxDMlJ5t8qiis/edit?usp=sharing > -- Thanks, David / dhildenb