From patchwork Tue Jun 14 09:21:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: mawupeng X-Patchwork-Id: 12880760 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 A5DC8C43334 for ; Tue, 14 Jun 2022 09:00:54 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 361CB6B01AE; Tue, 14 Jun 2022 05:00:54 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 29C406B01B3; Tue, 14 Jun 2022 05:00:54 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0EF186B01F0; Tue, 14 Jun 2022 05:00:54 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id EE4936B01AE for ; Tue, 14 Jun 2022 05:00:53 -0400 (EDT) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay13.hostedemail.com (Postfix) with ESMTP id C83396134E for ; Tue, 14 Jun 2022 09:00:53 +0000 (UTC) X-FDA: 79576246386.21.DA9E16C Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by imf15.hostedemail.com (Postfix) with ESMTP id E77AFA0090 for ; Tue, 14 Jun 2022 09:00:52 +0000 (UTC) Received: from dggpemm500022.china.huawei.com (unknown [172.30.72.54]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4LMj4W32ZCzRhyb; Tue, 14 Jun 2022 16:57:31 +0800 (CST) Received: from dggpemm500014.china.huawei.com (7.185.36.153) by dggpemm500022.china.huawei.com (7.185.36.162) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Tue, 14 Jun 2022 17:00:40 +0800 Received: from localhost.localdomain (10.175.112.125) by dggpemm500014.china.huawei.com (7.185.36.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Tue, 14 Jun 2022 17:00:38 +0800 From: Wupeng Ma To: , , , CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: [PATCH v5 3/5] mm: Limit warning message in vmemmap_verify() to once Date: Tue, 14 Jun 2022 17:21:54 +0800 Message-ID: <20220614092156.1972846-4-mawupeng1@huawei.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220614092156.1972846-1-mawupeng1@huawei.com> References: <20220614092156.1972846-1-mawupeng1@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.112.125] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggpemm500014.china.huawei.com (7.185.36.153) X-CFilter-Loop: Reflected ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1655197253; a=rsa-sha256; cv=none; b=TruoaDsQPNN3quwJC7K1dNSY9fXivXTMyVfUisRKCS0RUjuBO3ezc5EOs9XLxXk3PVA1mh VGCzFqvF4xP7Xs0xq1DjCiYsbn/lZISBp1Ss0C+3KE/MMZkHdx9m3CjDJG9MUEVynH3K+l IGTbehD2oWWZCyd1Oque/SVOjT8tAIE= ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=none; spf=pass (imf15.hostedemail.com: domain of mawupeng1@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=mawupeng1@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1655197253; h=from:from:sender: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=JQ+DUpAggQbP9A7hXLME3Hi+aR/uBH1++4qiEwbmJxc=; b=5vQyn8EC3xFqa5ymn5fYB3vFDSu6GSMAgZdEgHktWBKMh8vfS5y8hCcoDfrcAVYOdgJVR0 khQwgtV6Ka44QU66WIkeZ5SVVts/wG9JFbHiqnXLZlwBloRyXliYSsA7gXwEco8k7ECtab 7eb7VG2V2MwiFmDmjGLbw7BhDA6G9CI= X-Rspam-User: X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: E77AFA0090 X-Stat-Signature: rz3ze6qfrzfbr6bmw4yoxzd1f8t4nb57 Authentication-Results: imf15.hostedemail.com; dkim=none; spf=pass (imf15.hostedemail.com: domain of mawupeng1@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=mawupeng1@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com X-HE-Tag: 1655197252-810404 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: Ma Wupeng For a system only have limited mirrored memory or some numa node without mirrored memory, the per node vmemmap page_structs prefer to allocate memory from mirrored region, which will lead to vmemmap_verify() in vmemmap_populate_basepages() report lots of warning message. This patch change the frequency of "potential offnode page_structs" warning messages to only once to avoid a very long print during bootup. Signed-off-by: Ma Wupeng Acked-by: David Hildenbrand --- mm/sparse-vmemmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/sparse-vmemmap.c b/mm/sparse-vmemmap.c index f4fa61dbbee3..f34c6889b0a6 100644 --- a/mm/sparse-vmemmap.c +++ b/mm/sparse-vmemmap.c @@ -528,7 +528,7 @@ void __meminit vmemmap_verify(pte_t *pte, int node, int actual_node = early_pfn_to_nid(pfn); if (node_distance(actual_node, node) > LOCAL_DISTANCE) - pr_warn("[%lx-%lx] potential offnode page_structs\n", + pr_warn_once("[%lx-%lx] potential offnode page_structs\n", start, end - 1); }