Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp6106561pxb; Thu, 27 Jan 2022 06:41:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJwRmpaRBrWzRqX0Jqu5607GKD32J5sPJ8QXYd/9gjPZWiRnZFqhrhhpGVtFhLXVkICQ+vgz X-Received: by 2002:a17:907:c20:: with SMTP id ga32mr3146026ejc.638.1643294511483; Thu, 27 Jan 2022 06:41:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643294511; cv=none; d=google.com; s=arc-20160816; b=u/Ak4EHxitgHrWT9tZvA8LWCXS7cbEVJiJ0eaoyGkH/pX4EsdrTZV8c9Z6Zeq0Vudr cluvmYrdndiK8dQxzD09TO41OA4vPTF7YkFWcAmph1HlU1fKropkI+gnj2pfi9I6ToCq dA0huw+txUWsFfTAT09OqOf5JpLP/3mSavZn2a24Kt6zCCQW0zCHD9BinRr6KknUiHjQ S3q3yhE2hN1wrrajqLVnk200wG3g9YCkb3XjRucaz3pw9/rPbmVn53N9bMoFOQU0e+iH XmRNkEPnYPyx0H4rTzBiwctlev2Zafy62/d2yUmRKKczHhnDxlerQO+uqQAyRp8bKjDr Oe5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=XTSCSWPE5HlRFNZCvz3I8p5LYXgsNZWlsLbybuNzyTQ=; b=k3eCieKHyH7NXbZOdD2QDtNhFphurNpkh/RSqRlBNZ7yTaqvtZpV/yb2qVwKr7SlHI qErvcLF7RR8swQ6oE3b7ACWdu5oH5Lpa0GXx7vY/4bVOqlxXYusOxXTEolkiTakGm6Va kWgVs0fdzvcUISrUzwYVPcPcLmXb7DLh3T8GaJHXmLnBI4pbW66f5dfaO8x3Q6n1cqZF tQk0TPZS2YazpUWuiYhvSwBrVfB/gkTfmGLVfjizMrNDJVM6xdtaozbSadeOjycxFeGY 8XlKt245L0rB2ucyN90IvJQ6oGZjf0wQ/daL//tOsWOxvU2DxZ8RjI5Nuky84r8lYqIN 1/Nw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ho33si1226458ejc.35.2022.01.27.06.41.25; Thu, 27 Jan 2022 06:41:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238017AbiA0Ixc (ORCPT + 99 others); Thu, 27 Jan 2022 03:53:32 -0500 Received: from mail-ej1-f51.google.com ([209.85.218.51]:45664 "EHLO mail-ej1-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237956AbiA0IxW (ORCPT ); Thu, 27 Jan 2022 03:53:22 -0500 Received: by mail-ej1-f51.google.com with SMTP id me13so4109894ejb.12 for ; Thu, 27 Jan 2022 00:53:21 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=XTSCSWPE5HlRFNZCvz3I8p5LYXgsNZWlsLbybuNzyTQ=; b=FSOW0c2P5ofKKFZsLwUQdfXsC3YuIHGSW2LK3Kec4bKBcqlFllDOOTa2HooiGKYdIU aUiTrRS1XA2SuSnpX1MO/ZYRs8CsrKFBf3k7/a8gvtUFlaQQ5O7pVApG44ZQso1rvzUX W8RNJMiv8zhROdHaSZSUzSpJCRE4XMALCpByxiNY2AEj0e0mx1v6QvB641nV8uwEPq8s 9MZx2Gk10a3KAgPJTUWtFdT8GONIoWq8Ul8p+veU0KAWrp1UK3yOhP4nKQBGaDNPIrc9 0QkveBPa/OgdK/05C/hWze1r12IexDtE0BQscc1yYJVLIQzgZSnQFMLAc6icwiwJQszi Il9g== X-Gm-Message-State: AOAM5338uWgTeewRZXz7RjAeAHllSv7VFHBTNFYdBZRTq223/SHr9CUa GZZA4fnv5MmXPExIGP450uI= X-Received: by 2002:a17:907:b01:: with SMTP id h1mr2087725ejl.728.1643273600849; Thu, 27 Jan 2022 00:53:20 -0800 (PST) Received: from localhost.localdomain (ip-85-160-47-31.eurotel.cz. [85.160.47.31]) by smtp.gmail.com with ESMTPSA id n11sm11029757edv.52.2022.01.27.00.53.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Jan 2022 00:53:20 -0800 (PST) From: Michal Hocko To: Andrew Morton Cc: , LKML , David Hildenbrand , Alexey Makhalov , Dennis Zhou , Eric Dumazet , Oscar Salvador , Tejun Heo , Christoph Lameter , Nico Pache , Wei Yang , Rafael Aquini , Michal Hocko Subject: [PATCH 5/6] mm: make free_area_init_node aware of memory less nodes Date: Thu, 27 Jan 2022 09:53:04 +0100 Message-Id: <20220127085305.20890-6-mhocko@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220127085305.20890-1-mhocko@kernel.org> References: <20220127085305.20890-1-mhocko@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Michal Hocko 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 Acked-by: Rafael Aquini Signed-off-by: Michal Hocko --- mm/page_alloc.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 32d0189de4c5..83da2279be72 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -7682,9 +7682,14 @@ static void __init free_area_init_node(int nid) 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); -- 2.30.2