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 X-Spam-Level: X-Spam-Status: No, score=-7.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A785BC43460 for ; Fri, 16 Apr 2021 11:54:09 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4275F611AC for ; Fri, 16 Apr 2021 11:54:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4275F611AC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 852A86B0036; Fri, 16 Apr 2021 07:54:08 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 810C76B006C; Fri, 16 Apr 2021 07:54:08 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 654566B0070; Fri, 16 Apr 2021 07:54:08 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0052.hostedemail.com [216.40.44.52]) by kanga.kvack.org (Postfix) with ESMTP id 4B8266B0036 for ; Fri, 16 Apr 2021 07:54:08 -0400 (EDT) Received: from smtpin03.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 0D9C252AA for ; Fri, 16 Apr 2021 11:54:08 +0000 (UTC) X-FDA: 78038071776.03.63DD58D Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by imf26.hostedemail.com (Postfix) with ESMTP id A736B40002DF for ; Fri, 16 Apr 2021 11:54:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1618574046; 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=xRi3iLx/d1dCutzOrV2diewuBUaVQYIWtJjdL4DqXrA=; b=N4LZPZBF7qmgUdDmX5e27/Zk0KTqgTTBU6C49mVLSKMOAwcxjhABPBO42CBV+3mMrNqF5n DPEG9YId6sU6ldHJo+2d3CjdLW8zlItaOY70ybUtm4p7AJ8a5BPDYc669Yr6Oj6aqSAcA5 s0cC62KYf9izHfwXHlEudhFQN4Jk+qM= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-403-YMXf2KgcOjuEnLqU5aYHIQ-1; Fri, 16 Apr 2021 07:54:03 -0400 X-MC-Unique: YMXf2KgcOjuEnLqU5aYHIQ-1 Received: by mail-wr1-f71.google.com with SMTP id h60-20020adf90420000b029010418c4cd0cso3490279wrh.12 for ; Fri, 16 Apr 2021 04:54:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=xRi3iLx/d1dCutzOrV2diewuBUaVQYIWtJjdL4DqXrA=; b=rjjBgoGgnSkziO/Rz05suUscA3mAU1u3cgRKmeCk+Vr2poF6t5J2knjV7s03VLnQfD nMF8si2/0L710Za8wNXZxacoLDf4pOSE3xLWXzWZ2cHOOKWRL7BKlZCNyuwFt0GUpwoZ +1bqpqZVwYHipXPinUA0nvBdFtKU9AUp5y8lZuUlPiWZQZedaeHk3lDrbT+NtArh1ELV 17BG28pvqWYMxy2N3H/ph4FTgPQEHTIyhwTk/VeiDMnYifqGeN6IJ4KeC3F8eg0caftC UJv0Z6Q6Ve1Qu26loxDLmu+Y2zMzzOGSD/60gIIVbiU5MSmNJyLWWvQCMa59nXicYced jGew== X-Gm-Message-State: AOAM532ezPSubV08AeSY0Or/xauOiT0abKrvsvq842+6Ipi0SGVYvN/j 5GCIJB18bOWzZWzAJfm0NtsAex6357t5EU1YrZ7y+ZMmRb051i3x07xTSGNK0L9Vtp9LAIyUfjg RozDHLIIGXqWJ9LFBT6v005x14InQH7a8WpivawJYV3AOSENrNqkRMv2D66E= X-Received: by 2002:adf:bc49:: with SMTP id a9mr8859067wrh.109.1618574042135; Fri, 16 Apr 2021 04:54:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz45TPUrdRBbQjp6UKDSX/x4TG0TTzsbY/zQUnfTmbSPTX9s6AXQGbir4RRmOHT+616Hu9Ffw== X-Received: by 2002:adf:bc49:: with SMTP id a9mr8859040wrh.109.1618574041925; Fri, 16 Apr 2021 04:54:01 -0700 (PDT) Received: from [192.168.3.132] (p5b0c64fb.dip0.t-ipconnect.de. [91.12.100.251]) by smtp.gmail.com with ESMTPSA id b1sm10150075wru.90.2021.04.16.04.54.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 16 Apr 2021 04:54:01 -0700 (PDT) Subject: Re: [RFC/RFT PATCH 1/3] memblock: update initialization of reserved pages To: Mike Rapoport Cc: Ard Biesheuvel , Linux ARM , Anshuman Khandual , Catalin Marinas , Marc Zyngier , Mark Rutland , Mike Rapoport , Will Deacon , kvmarm , Linux Kernel Mailing List , Linux Memory Management List References: <20210407172607.8812-1-rppt@kernel.org> <20210407172607.8812-2-rppt@kernel.org> <0c48f98c-7454-1458-15a5-cc5a7e1fb7cd@redhat.com> <3811547a-9057-3c80-3805-2e658488ac99@redhat.com> From: David Hildenbrand Organization: Red Hat Message-ID: <1065c0ac-f9e3-2d3a-1ec4-a5c28f98c6ae@redhat.com> Date: Fri, 16 Apr 2021 13:54:00 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: A736B40002DF X-Stat-Signature: xudb4xw9j7qgxi8thmtzktfbrxpstq4p Received-SPF: none (redhat.com>: No applicable sender policy available) receiver=imf26; identity=mailfrom; envelope-from=""; helo=us-smtp-delivery-124.mimecast.com; client-ip=216.205.24.124 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1618574042-609516 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 16.04.21 13:44, Mike Rapoport wrote: > On Thu, Apr 15, 2021 at 11:30:12AM +0200, David Hildenbrand wrote: >>> Not sure we really need a new pagetype here, PG_Reserved seems to be quite >>> enough to say "don't touch this". I generally agree that we could make >>> PG_Reserved a PageType and then have several sub-types for reserved memory. >>> This definitely will add clarity but I'm not sure that this justifies >>> amount of churn and effort required to audit uses of PageResrved(). >>>> Then, we could mostly avoid having to query memblock at runtime to figure >>>> out that this is special memory. This would obviously be an extension to >>>> this series. Just a thought. >>> >>> Stop pushing memblock out of kernel! ;-) >> >> Can't stop. Won't stop. :D >> >> It's lovely for booting up a kernel until we have other data-structures in >> place ;) > > A bit more seriously, we don't have any data structure that reliably > represents physical memory layout and arch-independent fashion. > memblock is probably the best starting point for eventually having one. We have the (slowish) kernel resource tree after boot and the (faster) memmap. I really don't see why we really need another slowish variant. We might be better off to just extend and speed up the kernel resource tree. Memblock as is is not a reasonable datastructure to keep around after boot: for example, how we handle boottime allocations and reserve regions both as reserved. -- Thanks, David / dhildenb