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 E7457C433B4 for ; Fri, 16 Apr 2021 11:54:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AB71B61184 for ; Fri, 16 Apr 2021 11:54:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235498AbhDPLya (ORCPT ); Fri, 16 Apr 2021 07:54:30 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:49814 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229706AbhDPLy3 (ORCPT ); Fri, 16 Apr 2021 07:54:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1618574044; 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=DK1TEerStVBGE5+gk48kDFVk0WW6WDqKeEa2wh+sn+mkXJ9lFXo4K18Lj4H8uHL2SkqEVs cIl3u6pNYjP3xLNKGa4DTH3lLufJtvg/K4lSo4+bCfp/4rphHulY5vzfa3+fNwCi0+5qMl jRlUElM0Nb3TQLnWQmSzzRsyNz15zT8= 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-45-SZiIfyt5NbW2ZxTgjIt3Wg-1; Fri, 16 Apr 2021 07:54:03 -0400 X-MC-Unique: SZiIfyt5NbW2ZxTgjIt3Wg-1 Received: by mail-wr1-f71.google.com with SMTP id m16-20020a0560000250b02900ffde35c102so4351436wrz.20 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=d30CWcb80S+K7RKIBhiRdANPXzKMT+SkLYkgAXQV1lNuNPq2cms70JC60eu6PKPgFR eCBGYK3XG+OeleVt+r5E/v4fgyARVvGgYk6Lcr8aQqq9usYKyEl4HaKxClwsxpQJVVJy 8rO+ETP3vHjxjBhiqIesmGDG/N+0nNfWRn5Yj/HYcYcccYZpLjjTs+8SQXPO1JlzDo2l QfTP0bYoZxOEWyqUCFJ97xa4HjoTKwCPe5KKbKMv5S/7Aixn9SjuQGL+gMfO+Pg+930G zgV88gKnPTLG9N5Yiy1dt9FpQz4OAQJNWbfpMioWX7ijmrDDB4a048Kv/cZcMG0mRfIC GlMQ== X-Gm-Message-State: AOAM530WYbCyxWiaSRcMANOLlHe+S0H8LIk/bGF2cT3OC3UU2SlGxboS 17RX7yh8McVn/8DKONyNc3O4vgkphsYTS0V5aB/tPgb6eKE+t5uPhi8Hvz5r8D/QADBE9liBEx3 xbInXbhFKT1kKkwcjQW8ejATA X-Received: by 2002:adf:bc49:: with SMTP id a9mr8859056wrh.109.1618574042105; 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: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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