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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 69B64CCA47D for ; Thu, 9 Jun 2022 08:13:54 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A76B66B0080; Thu, 9 Jun 2022 04:13:53 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A27916B0081; Thu, 9 Jun 2022 04:13:53 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8ED936B0082; Thu, 9 Jun 2022 04:13:53 -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 7E6B76B0080 for ; Thu, 9 Jun 2022 04:13:53 -0400 (EDT) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 53CCBC1C for ; Thu, 9 Jun 2022 08:13:53 +0000 (UTC) X-FDA: 79557983946.13.6B43E84 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by imf23.hostedemail.com (Postfix) with ESMTP id 3DFE2140055 for ; Thu, 9 Jun 2022 08:13:51 +0000 (UTC) Received: from dggpemm500024.china.huawei.com (unknown [172.30.72.55]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4LJcKx5gqNz8wtL; Thu, 9 Jun 2022 16:13:25 +0800 (CST) Received: from dggpemm500014.china.huawei.com (7.185.36.153) by dggpemm500024.china.huawei.com (7.185.36.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Thu, 9 Jun 2022 16:13:45 +0800 Received: from [10.174.178.120] (10.174.178.120) 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; Thu, 9 Jun 2022 16:13:43 +0800 Message-ID: <8d5e867f-e51a-d763-5ac3-6dfc4e67a376@huawei.com> Date: Thu, 9 Jun 2022 16:13:43 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 From: mawupeng Subject: Re: [PATCH v3 4/6] mm: Demote warning message in vmemmap_verify() to debug level To: , , , , , CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , References: <20220607093805.1354256-1-mawupeng1@huawei.com> <20220607093805.1354256-5-mawupeng1@huawei.com> <1f2a76d5-7c4e-46bc-ce66-20a962eac73c@arm.com> In-Reply-To: <1f2a76d5-7c4e-46bc-ce66-20a962eac73c@arm.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.174.178.120] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggpemm500014.china.huawei.com (7.185.36.153) X-CFilter-Loop: Reflected ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1654762432; a=rsa-sha256; cv=none; b=gUh6h5IbCKksYCfZIyTGGDwv7s6J7ZCZP1uEI7iObzoCkDG+UBrUBwg+V+BujgPeZHCaSM e2efYdxdb3AVUIrUFvA/auu39HFv1pR5L3OnPSgUCDhlbv0CMEfSB/JS9dwlrH2fbuHXqx C1iE+3Gfw7BuYHetcHwRDE3Hs5aYDYc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1654762432; 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=DV4ho7SiNiTrSyQ5kUJlcQPW9KJWZ07MEDa5OPWdqXk=; b=T1Mk2ijQU4kN2f4s4/6NAnOMgPtPmHIWOq7/hr75cDkkgpsjGm1FjN0G5eF/fLazoboYEd tyqTLtkwsjBEJDu66b6dq7I3fU9Rnz96kSLeaFU2i0irgreql4kxVHZZLC8EOzuLtglsSq Rfkm3HQLdmtND33BKBrESr3L2+ik7oY= ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf23.hostedemail.com: domain of mawupeng1@huawei.com designates 45.249.212.189 as permitted sender) smtp.mailfrom=mawupeng1@huawei.com Authentication-Results: imf23.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf23.hostedemail.com: domain of mawupeng1@huawei.com designates 45.249.212.189 as permitted sender) smtp.mailfrom=mawupeng1@huawei.com X-Stat-Signature: 6gpc7zpqbdpxgiiiofrc1ydy3mummjeq X-Rspamd-Queue-Id: 3DFE2140055 X-Rspamd-Server: rspam12 X-Rspam-User: X-HE-Tag: 1654762431-235924 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: 在 2022/6/8 18:00, Anshuman Khandual 写道: > > > On 6/8/22 06:56, mawupeng wrote: >> >> >> 在 2022/6/7 20:25, David Hildenbrand 写道: >>> On 07.06.22 11:38, Wupeng Ma wrote: >>>> 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 demote the "potential offnode page_structs" warning messages >>>> to debug level to avoid a very long print during bootup. >>>> >>>> Signed-off-by: Ma Wupeng >>>> --- >>>>   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..78debdb89eb1 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_debug("[%lx-%lx] potential offnode page_structs\n", >>>>               start, end - 1); >>>>   } >>>> >>> >>> This will possibly hide it in environments where this might indeed >>> indicate performance issues. >>> >>> What about a pr_warn_once()? >>> >> >> Sure. >> >> This will works. We can certainly use a pr_warn_once(). > > Why not pr_warn_ratelimited() like in the previous patch ? Function vmemmap_populate_basepages() is used to populate base pages. System with huge memory will produce lots lots of warning message during this populate process even with ratelimited. This may lead to slow startup. Thanks for reviewing. > .