From patchwork Tue Mar 22 21:47:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 12789252 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 080C8C433FE for ; Tue, 22 Mar 2022 21:47:08 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8E06F6B0174; Tue, 22 Mar 2022 17:47:07 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 891946B0175; Tue, 22 Mar 2022 17:47:07 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 77E536B0176; Tue, 22 Mar 2022 17:47:07 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0024.hostedemail.com [216.40.44.24]) by kanga.kvack.org (Postfix) with ESMTP id 65C596B0174 for ; Tue, 22 Mar 2022 17:47:07 -0400 (EDT) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 28B4AA2B0A for ; Tue, 22 Mar 2022 21:47:07 +0000 (UTC) X-FDA: 79273358094.28.D2B65F3 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf11.hostedemail.com (Postfix) with ESMTP id A2B5440007 for ; Tue, 22 Mar 2022 21:47:06 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 91467B81DAF; Tue, 22 Mar 2022 21:47:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4F7C7C340EE; Tue, 22 Mar 2022 21:47:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1647985624; bh=urddp+u7qEoMilszfxvuCzWkSMvo7mc65sO3QUuIc0s=; h=Date:To:From:In-Reply-To:Subject:From; b=kg/qReqmk0Kqs0dCFx+uZXRs6w2HeRNgNTdULm1IKUUj/mYfAFSafchKl4VvQsMvt uVTmnuW3ZD94HZF7apZ0S0kuV/d+uzntkEkgZ6uUUP3hKbXzfpUnkKn3BoaR0OdP5z QA8xjy4G6sX6VIJY+wgRSL+f1YncFdal7eVABBig= Date: Tue, 22 Mar 2022 14:47:03 -0700 To: tj@kernel.org,rppt@linux.ibm.com,richard.weiyang@gmail.com,raquini@redhat.com,osalvador@suse.de,npache@redhat.com,eric.dumazet@gmail.com,dennis@kernel.org,david@redhat.com,cl@linux.com,amakhalov@vmware.com,mhocko@suse.com,akpm@linux-foundation.org,patches@lists.linux.dev,linux-mm@kvack.org,mm-commits@vger.kernel.org,torvalds@linux-foundation.org,akpm@linux-foundation.org From: Andrew Morton In-Reply-To: <20220322143803.04a5e59a07e48284f196a2f9@linux-foundation.org> Subject: [patch 168/227] mm: make free_area_init_node aware of memory less nodes Message-Id: <20220322214704.4F7C7C340EE@smtp.kernel.org> X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: A2B5440007 X-Stat-Signature: y4tfzo4hnk4iquf7e3czmf16wppedw4c X-Rspam-User: Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b="kg/qReqm"; dmarc=none; spf=pass (imf11.hostedemail.com: domain of akpm@linux-foundation.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org X-HE-Tag: 1647985626-727484 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: From: Michal Hocko Subject: mm: make free_area_init_node aware of memory less nodes free_area_init_node is also called from memory less node initialization path (free_area_init_memoryless_node). It doesn't really make much sense to display the physical memory range for those nodes: Initmem setup node XX [mem 0x0000000000000000-0x0000000000000000] Instead be explicit that the node is memoryless: Initmem setup node XX as memoryless Link: https://lkml.kernel.org/r/20220127085305.20890-6-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Rafael Aquini Acked-by: David Hildenbrand Reviewed-by: Mike Rapoport Reviewed-by: Oscar Salvador Cc: Alexey Makhalov Cc: Christoph Lameter Cc: Dennis Zhou Cc: Eric Dumazet Cc: Nico Pache Cc: Tejun Heo Cc: Wei Yang Signed-off-by: Andrew Morton --- mm/page_alloc.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) --- a/mm/page_alloc.c~mm-make-free_area_init_node-aware-of-memory-less-nodes +++ a/mm/page_alloc.c @@ -7642,9 +7642,14 @@ static void __init free_area_init_node(i pgdat->node_start_pfn = start_pfn; pgdat->per_cpu_nodestats = NULL; - pr_info("Initmem setup node %d [mem %#018Lx-%#018Lx]\n", nid, - (u64)start_pfn << PAGE_SHIFT, - end_pfn ? ((u64)end_pfn << PAGE_SHIFT) - 1 : 0); + if (start_pfn != end_pfn) { + pr_info("Initmem setup node %d [mem %#018Lx-%#018Lx]\n", nid, + (u64)start_pfn << PAGE_SHIFT, + end_pfn ? ((u64)end_pfn << PAGE_SHIFT) - 1 : 0); + } else { + pr_info("Initmem setup node %d as memoryless\n", nid); + } + calculate_node_totalpages(pgdat, start_pfn, end_pfn); alloc_node_mem_map(pgdat);