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 6E294C433EF for ; Mon, 27 Sep 2021 17:24:16 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 443C16108E for ; Mon, 27 Sep 2021 17:24:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 443C16108E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=quicinc.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:CC:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ueQzaU5YWdur3v/aicpLbmj8BaACjEq1fQ0yRRKrZCw=; b=JBYfdFmiO6e1Td 4J4K+l0RK6sHCrz4JvRssAt0Ndl/GdwE/v6j6yPH2n1WGM8Ux1TGcxBw2sjxenug3j44mmOVIqRcR u/9DZdE/hOaQKgfFYY8E2BdJw9mzeMZF3V9GApocAOd7MpXEWr3yzvek4LY81ZHnnyPvy1mmVkmGX v76H7NrSqRAQ6Cb/ZhnjI+D8s3Fsl+aInH8OS2252os8H7NxYJ5VI4QsaY9q17YuvcJQlGIsIHIEJ oMdiqISnsdX2l2u3MKUmdRg3VTFSlUzP91vKS40mia+S1yoUm3DE2jlCjI40mXYgBt7SmugK5njj/ HWi/1nnFjGrd7kEn9Eew==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mUuLE-003Z05-Bq; Mon, 27 Sep 2021 17:23:00 +0000 Received: from alexa-out-sd-02.qualcomm.com ([199.106.114.39]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mUuLA-003Yyg-Ai for linux-arm-kernel@lists.infradead.org; Mon, 27 Sep 2021 17:22:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1632763376; x=1664299376; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=f2ZLlKxl3PUVq5tABjTZdLABXQd06AW4cCIiqAe8J7k=; b=wvezRhXsyDxBCB/gBj2snJZT5zQtQn5pipR/K+suyqzuD2uvWsYorAHu v4/6/rp29rSdDeJQaR4VtUNQDkkn9eddoaISY5L7+UmOyyW+FnXpBDSrd fiY7VjqtRkwFHVv290bMw+65xfI051+v1DHU3pci2ZUtdRHXmHv1/d1OU k=; Received: from unknown (HELO ironmsg04-sd.qualcomm.com) ([10.53.140.144]) by alexa-out-sd-02.qualcomm.com with ESMTP; 27 Sep 2021 10:22:52 -0700 X-QCInternal: smtphost Received: from unknown (HELO nasanex01a.na.qualcomm.com) ([10.52.223.231]) by ironmsg04-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Sep 2021 10:22:52 -0700 Received: from [10.251.44.228] (10.80.80.8) by nasanex01a.na.qualcomm.com (10.52.223.231) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.922.7; Mon, 27 Sep 2021 10:22:49 -0700 Message-ID: <4f4f6e93-ddc2-c9bb-ef47-4a40f2c3d0d7@quicinc.com> Date: Mon, 27 Sep 2021 20:22:46 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.1.1 Subject: Re: [RFC] arm64: mm: update max_pfn after memory hotplug Content-Language: en-US To: Chris Goldsworthy , Catalin Marinas , Will Deacon , Andrew Morton CC: David Hildenbrand , , , , Sudarshan Rajagopalan References: <595d09279824faf1f54961cef52b745609b05d97.1632437225.git.quic_cgoldswo@quicinc.com> From: Georgi Djakov In-Reply-To: <595d09279824faf1f54961cef52b745609b05d97.1632437225.git.quic_cgoldswo@quicinc.com> X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nasanex01a.na.qualcomm.com (10.52.223.231) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210927_102256_439746_A318F406 X-CRM114-Status: GOOD ( 14.97 ) 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 9/24/2021 1:54 AM, Chris Goldsworthy wrote: > From: Sudarshan Rajagopalan > > After new memory blocks have been hotplugged, max_pfn and max_low_pfn > needs updating to reflect on new PFNs being hot added to system. > > Signed-off-by: Sudarshan Rajagopalan > Signed-off-by: Chris Goldsworthy Thanks for the patch, Chris! With this patch, the data in /proc/kpageflags appears to be correct and memory tools like procrank work again on arm64 platforms. Tested-by: Georgi Djakov Maybe we should add fixes tag, as it has been broken since the following commit: Fixes: abec749facff ("fs/proc/page.c: allow inspection of last section and fix end detection") Thanks, Georgi > --- > arch/arm64/mm/mmu.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c > index cfd9deb..fd85b51 100644 > --- a/arch/arm64/mm/mmu.c > +++ b/arch/arm64/mm/mmu.c > @@ -1499,6 +1499,11 @@ int arch_add_memory(int nid, u64 start, u64 size, > if (ret) > __remove_pgd_mapping(swapper_pg_dir, > __phys_to_virt(start), size); > + else { > + max_pfn = PFN_UP(start + size); > + max_low_pfn = max_pfn; > + } > + > return ret; > } > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel