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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 14D43C433FE for ; Fri, 24 Sep 2021 20:53:10 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8D4F761242 for ; Fri, 24 Sep 2021 20:53:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 8D4F761242 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=quicinc.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id E86F06B0071; Fri, 24 Sep 2021 16:53:08 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E36A36B0072; Fri, 24 Sep 2021 16:53:08 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D24B06B0073; Fri, 24 Sep 2021 16:53:08 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0117.hostedemail.com [216.40.44.117]) by kanga.kvack.org (Postfix) with ESMTP id C07F26B0071 for ; Fri, 24 Sep 2021 16:53:08 -0400 (EDT) Received: from smtpin23.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 775DE39F5B for ; Fri, 24 Sep 2021 20:53:08 +0000 (UTC) X-FDA: 78623666856.23.4DA0D61 Received: from alexa-out.qualcomm.com (alexa-out.qualcomm.com [129.46.98.28]) by imf28.hostedemail.com (Postfix) with ESMTP id BD9F890000A4 for ; Fri, 24 Sep 2021 20:53:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1632516788; x=1664052788; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=NWi+/obJ5SRPKntuFtbOfRlh9MXiWPHJ5Z9qzdR+g9w=; b=ZVa50ukaLbNEOVsmDplHDkR/udX1MhEd9H+HsYt4QX+ho8ctexiqHTue 8nRyYSdA3pDJkOc1IXm6DVpwhyru/nPrcpPPKNGlKrtdYFYeKKW+aMUwz tNOK9eojfUs+3seFt6UdJoR/heTXS2yX0vWh509mB34jkMzQTKu9LrRuW g=; Received: from ironmsg09-lv.qualcomm.com ([10.47.202.153]) by alexa-out.qualcomm.com with ESMTP; 24 Sep 2021 13:53:06 -0700 X-QCInternal: smtphost Received: from nalasex01a.na.qualcomm.com ([10.47.209.196]) by ironmsg09-lv.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Sep 2021 13:53:06 -0700 Received: from hu-cgoldswo-sd.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.922.7; Fri, 24 Sep 2021 13:53:05 -0700 Date: Fri, 24 Sep 2021 13:52:58 -0700 From: Chris Goldsworthy To: David Hildenbrand CC: Florian Fainelli , Chris Goldsworthy , Catalin Marinas , "Will Deacon" , Andrew Morton , , , , Sudarshan Rajagopalan , "Doug Berger" Subject: Re: [RFC] arm64: mm: update max_pfn after memory hotplug Message-ID: <20210924205258.GA17966@hu-cgoldswo-sd.qualcomm.com> References: <595d09279824faf1f54961cef52b745609b05d97.1632437225.git.quic_cgoldswo@quicinc.com> <6eb8319d-acba-b69a-5db3-5dca9ef426e8@gmail.com> <41789cad-76c6-0ea5-4aa1-3e4a52acff86@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <41789cad-76c6-0ea5-4aa1-3e4a52acff86@redhat.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: BD9F890000A4 X-Stat-Signature: yk36nunkzq1n7e9rnsjbptycrau41c1z Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=quicinc.com header.s=qcdkim header.b=ZVa50uka; dmarc=pass (policy=none) header.from=quicinc.com; spf=pass (imf28.hostedemail.com: domain of quic_cgoldswo@quicinc.com designates 129.46.98.28 as permitted sender) smtp.mailfrom=quic_cgoldswo@quicinc.com X-HE-Tag: 1632516787-972897 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: Thanks for the response David. On Fri, Sep 24, 2021 at 10:17:46AM +0200, David Hildenbrand wrote: > no-map means that no direct mapping is to be created, right? We would still > have a memmap IIRC, and the pages are PG_reserved. > > Again, I think this is very similar to just having no-map regions like > random memory holes within the existing memory layout. For those curious, see __reserved_mem_alloc_size() > early_init_dt_alloc_reserved_memory_arch() > memblock_mark_nomap() - the 'no-map' attribute is read in __reserved_mem_alloc_size() and the pre-requisite steps need to have the relevant struct pages marked as PG_reserved are taken in memblock_mark_nomap(). > What Chris proposes here is very similar to > arch/x86/mm/init_64.c:update_end_of_memory_vars() called during > arch_add_memory()->add_pages() on x86-64. > For other's reference, the patch was derived from what x86 is doing with max_pfn (such that we also set max_low_pfn as is done in arm64's mm/init.c.