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 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=-5.1 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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 373EBC433B4 for ; Fri, 16 Apr 2021 11:54:11 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id ABEBC611AC for ; Fri, 16 Apr 2021 11:54:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ABEBC611AC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvmarm-bounces@lists.cs.columbia.edu Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 39EB14B476; Fri, 16 Apr 2021 07:54:10 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Authentication-Results: mm01.cs.columbia.edu (amavisd-new); dkim=softfail (fail, message has been altered) header.i=@redhat.com Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id W19sn9r9kgDn; Fri, 16 Apr 2021 07:54:09 -0400 (EDT) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 3B3F24B496; Fri, 16 Apr 2021 07:54:09 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 66D844B476 for ; Fri, 16 Apr 2021 07:54:08 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id D9XPgkt2N7YO for ; Fri, 16 Apr 2021 07:54:07 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 71B194B3FB for ; Fri, 16 Apr 2021 07:54:07 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1618574047; 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=U5kduDFXJ13rnyBzQXObLRY1jPYsKAV1g65VpM6qPfF3+Wa0T2ZK2ZkNkRLfgO1Ys4bmPZ gLxUlb+Vs/CsjO8SiqXVa4gYw72JEC0Uie0JA+D+YX3BQgDrjWff9cvR5SriDfRN1sPKRp VxG/3Ct52FQG/fMmTTwgp4uSJ12DnQs= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-403-a_gQaE1hObSkOJITUoJ4jQ-1; Fri, 16 Apr 2021 07:54:03 -0400 X-MC-Unique: a_gQaE1hObSkOJITUoJ4jQ-1 Received: by mail-wr1-f69.google.com with SMTP id d15-20020a5d538f0000b02901027c18c581so4311561wrv.3 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=pEFnXLNhpoaJCbM3rGkMWs9Afll/sHlxYnYazlZXqUnOkEE41FThlnncB3zCke+1hL tAwV2aLtp1YCqC+W2c9jiPCYy1rpEMxYeTviOgi+fSDrSLGrQjBKI8ktbsSJifLQ8ZmE 12jmRidTmZd7LMqQKEWeZWqaq7ZTGkcXGsXUz9k063xHCJWlVw/Ep+EydvqhgKnB0Zcb c6JLZfwuiD7IkXM+PnDRtfUVpDWuW6Hw7ueVY9W2a0mlejxKj1/dgT72PdL8xzAo13E5 TmdW+WtdTYJo0jFD++qclyRqj1OI5RjSdTpwBf30sWLYEQfrPI/to6NMBLxQ9vsBzcOO QqPg== X-Gm-Message-State: AOAM531KikyO7tRlmOvl3eD9ctnmN+ZWmbRd7m1LY5iAlqV6s1Q8L5P0 IZuPWxejwLkrnnMJ6i6ivQDbDZDk0ZHjJuX4RaxuegrMPyEd8REOH9xgfZUVtXW4ZeMBaqpLJAm OUTonMMcCwtfoRAyZ9AnOWY/m X-Received: by 2002:adf:bc49:: with SMTP id a9mr8859073wrh.109.1618574042168; 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 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-Language: en-US Cc: Anshuman Khandual , Catalin Marinas , Linux Kernel Mailing List , Mike Rapoport , Linux Memory Management List , kvmarm , Marc Zyngier , Will Deacon , Linux ARM X-BeenThere: kvmarm@lists.cs.columbia.edu X-Mailman-Version: 2.1.14 Precedence: list List-Id: Where KVM/ARM decisions are made List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu 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 _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm 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=-5.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,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 DF851C433ED for ; Fri, 16 Apr 2021 12:02:22 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4E7B6611AB for ; Fri, 16 Apr 2021 12:02:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4E7B6611AB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:Cc:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=a8A1hJw91gHEhZ7hK/wKpCZwA8YWXhCnKBMR8uVNS68=; b=GZvWAyqNbM43PexA3eJyR7+jM t/MQgY4EQNqPwTZEgVpQWlwNsK+zo0kKpvhGFVsXL6h0rjjJfpiZ4NHUFIDBx5Dl+RWatbGB5yQqx z99gXsfYzeL/zNxwt/7r1UCJVcAPJjTLkTwqofg4rq7bZhIz81g8vgO9XOfl4NK5hWPmjY2ElqS3w D2Xw03opR5eTBjHecZJQYdjxdIedyYqNf44xckwMru736mPFvY/S+ql2E9oJ5eyvCmiCSxECktyn4 HzzQSvAK5uFNrnAVi7vqQbekmdUtDAaOt2l57X/9ISQywVs93ddW96H22v8F+8Py0x+hgaW0CxzAo WJOw9MC+w==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lXN8Q-0020Wx-HC; Fri, 16 Apr 2021 11:59:42 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lXN33-001zW0-Qu for linux-arm-kernel@desiato.infradead.org; Fri, 16 Apr 2021 11:54:10 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To: Subject:Sender:Reply-To:Content-ID:Content-Description; bh=xRi3iLx/d1dCutzOrV2diewuBUaVQYIWtJjdL4DqXrA=; b=RudlaHnsgyWfcWzmqlBFEG+wjn XUuTUr/swtZ3tzBncBlNsQos67weKpDS4BcZXl0XYv0P+W6b94NVutoUYl32Aou54reARcHha/lrn TaReXa4BUaWYHLnEgoqLzNn0HzrDaL0CR5QdEEyuAsCt3gwR9NYCzk+Fcm21qkrxF43hGxYx6dfiT UDlA8JVuJbkq5pcIFxOLNxIfEqImxgT5O8PrnKIpgsVLstqgf/8C7q+Ii7Ib4gQve6zE1zFLdpXUO 6A+ktPaa1v3PYKBlFMSWe2P/xJ/5+tzHmJ7uYkcuce7M9lnn5MRNPBEFs3gQgQKnSgObcQZsVTuhS lp1ypc9Q==; Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lXN31-009Kpm-5h for linux-arm-kernel@lists.infradead.org; Fri, 16 Apr 2021 11:54:08 +0000 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-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-293-umbck7NeN3eDtxT-0yQXDg-1; Fri, 16 Apr 2021 07:54:03 -0400 X-MC-Unique: umbck7NeN3eDtxT-0yQXDg-1 Received: by mail-wr1-f69.google.com with SMTP id t14-20020adff04e0000b0290103307c23e1so4349671wro.8 for ; Fri, 16 Apr 2021 04:54:02 -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=N66LgNK12ETSWuMww2ujzIpYE4uTgTiLrYrVN7WiBagupN7XaTLqQw8QX5+ILGXQOd csCnqApSEddqiwSrPJOociDtYeW8u2eRKz0rjmkO/ttSvmwAPYa+WboB9J2sKNG4/Bxy +NczpJpis9jBuPkKMTfrSIzjBNGn2jcPjc0VhfuogO5kOBZkT7eXYmhzQzuGs/gub0kE JAbx4pnwLI1Mub6PUcpyQAElegFo2XxxoUQKRzulJNyFPuVXvc9tg7fHdbz3tYksg6p6 yJjUXE96VdZhz0tB0ll6GQqhbrmFyXy9RWVNyVH0DDM9DI2koehoux2uTf7M30+dQVEu 32HA== X-Gm-Message-State: AOAM531x711X19pBYjgvgFMENjCVJ3IdESstM2C4M6v3MjIbFMuShMg8 giKlsdOT2RBGGdroXXsr7MfWtLNpRiG8E28kuqkCNbMZ1K6HDONEHhqIoEmlH+GQ9Pzp2d5C9tj +FAIDKgqV4TVCJit6EVprhoSbYoW+pDCZT68= X-Received: by 2002:adf:bc49:: with SMTP id a9mr8859057wrh.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: 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-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210416_045407_342960_78ACAA87 X-CRM114-Status: GOOD ( 19.17 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel