Received: by 2002:a5d:925a:0:0:0:0:0 with SMTP id e26csp1247755iol; Fri, 10 Jun 2022 03:36:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwyO2JPM0ytwl9Rj5KRvbhNaqZHBUKjZU8DkP7lOzEpDjGC4htJNHfBty3+XDdJGiQXAYLV X-Received: by 2002:a63:6bca:0:b0:3f7:a42:e1b7 with SMTP id g193-20020a636bca000000b003f70a42e1b7mr39573559pgc.620.1654857398955; Fri, 10 Jun 2022 03:36:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654857398; cv=none; d=google.com; s=arc-20160816; b=SGLpN/F4d/V39N62pmkbfTVZpvEbSBgdQbPF5LyQ+xd2aa1ZIjjUBZkuWqcGx7oINM FyaX29Dt7Bw8PalrEmpkiqAbnLKFXTcNalB9IFwnlvr59T3mc4hqwKSPd1VmHgYJGOOG nlGdPjlUQ4cZe0xBVzlgx6KsMNiFRUY4o3zGjp0ZJXkyeL1+HNRs0btVoC8MedZ7vpaM gugEbW1fZKEfV6Wcf2cbZLVJRca3JJtd5QH/lBk0Ncc4yDA6HpbOz54LyGacBa6Ow2jb I4YGdt+I61+VOSY6rrtttRdCJsLlybuADIMag7qFWsHO7Z7LGow0lhXxIQlyoA5wmg1m eQbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=KMds9ebxCj972Zfv0Is4xHDNgxdIPmGYDY6fRdBbYwc=; b=rkUeZqCy0E/YoXgzZS76/5WysNzOAv2Im20LTP1YIwb2gAseJ0ZtHxoG5MKtRLosnu FeXLtJieTPO1ny1VM3RcXBv1CL1Lm5Md3XRAgb7qnvLoGMoYMCLCXKVaiaZxiQXKZqdq PMLXAQ2WKlUzr6xOOWquHbiovghRyBm8X9yesvDyngq4PN0JuphItbmO8pvy4OMxuyrh ThXvUVwDilxuBu9fvtUKfezBmKf9Asism8WoStq26xAhEBKiQC4VGswx3Qg+CtRcUZOV sXcBT6YV7J6pYJhLRcB1c0gSmz5C3WksreUVW8B7tb2rHxsp0yML+FKgJZ+tnD1G3XJx 2VZA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j21-20020a17090a841500b001dfbc12d559si2507128pjn.155.2022.06.10.03.36.25; Fri, 10 Jun 2022 03:36:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349267AbiFJJgA (ORCPT + 99 others); Fri, 10 Jun 2022 05:36:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60952 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348886AbiFJJf6 (ORCPT ); Fri, 10 Jun 2022 05:35:58 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B9EAF215; Fri, 10 Jun 2022 02:35:56 -0700 (PDT) Received: from dggpemm500021.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4LKG4W0dLlzdZvG; Fri, 10 Jun 2022 17:34:03 +0800 (CST) Received: from dggpemm500001.china.huawei.com (7.185.36.107) by dggpemm500021.china.huawei.com (7.185.36.109) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Fri, 10 Jun 2022 17:35:54 +0800 Received: from [10.174.177.243] (10.174.177.243) by dggpemm500001.china.huawei.com (7.185.36.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Fri, 10 Jun 2022 17:35:53 +0800 Message-ID: Date: Fri, 10 Jun 2022 17:35:52 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH v3 4/6] mm: Demote warning message in vmemmap_verify() to debug level Content-Language: en-US To: mawupeng , , , , , , CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , References: <20220607093805.1354256-1-mawupeng1@huawei.com> <20220607093805.1354256-5-mawupeng1@huawei.com> <1f2a76d5-7c4e-46bc-ce66-20a962eac73c@arm.com> <8d5e867f-e51a-d763-5ac3-6dfc4e67a376@huawei.com> From: Kefeng Wang In-Reply-To: <8d5e867f-e51a-d763-5ac3-6dfc4e67a376@huawei.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.174.177.243] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpemm500001.china.huawei.com (7.185.36.107) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2022/6/9 16:13, mawupeng wrote: > > > 在 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. I think pr_warn_once is better, the memblock_alloc fallback is not frequent, but vmemmap_verify will verify each memory and print a lot. > > Thanks for reviewing. > >> . > .