Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2888280rwd; Mon, 29 May 2023 02:23:07 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5GtzTP2BoZCfDEKHxS9w8CiUo3EMIP/SmRtdTDCoFJS5vAJXqIaBohaRHcUXFwoopiIkZc X-Received: by 2002:a17:90a:2a49:b0:256:4196:f722 with SMTP id d9-20020a17090a2a4900b002564196f722mr8369270pjg.47.1685352186883; Mon, 29 May 2023 02:23:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685352186; cv=none; d=google.com; s=arc-20160816; b=LOmifYyabPYbCOoVYL/JLXXf6JdXa1ZnawMloK6puURwxH0ZUjnxelLIeAN8+9FwhX YZxUskmCUlXCGmJ/Zrs4iuchQ9LRT/F6jHlf/dy5hehhPzPu+6LhmjSZMWRHbv4US75E B66hAwkKNA0Zb/Wxp4dF5vuw6ft7x5qT4yDVGJNTuAysSAYR4Sn/L7ziaIXkiaZNKK1K gQ86t2/fNsE3u2R5RSQoVqClNEndooz9q/9gvJoQGR1DEgBAUwzOtGBl6H6GrYypOUc8 wcqN9w4qKNMmYHOXvym8vchSi/PWomLh+jgg5O/UEd4sztYyZVm1RoAFCwEDS4To8LHi lopw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=SKCN6+rIJbSn4UUW83iTDhQxYZuSyFGccz9+NYMd5cU=; b=RLMvE8g+H1l34h2wZm0NKR4quhgRRcoTm7YWGpa/sHApPbfaLWbrtV6i5mebIJQOyC Ci8GR8WYG+ZP5SjrlGdaq6OswgZDyBT5LqsL0fBuJAo87YNe9KQlGSBqelSwUhq/AT4y PQa7rq1NCkqLOKLN9x9wWKZfe8xeMYGm0Dm4fdvL454Qvwfjb//VuHiovz/cbWbjSRVS CYMvVsY7l9xS8PO2jtVAYElydW0FoT5Xwn1g5ciEAfmWVnGFDrF/QmOIdtQLnBV/utcE 35c27Qeva2q015sby9xakDx6WX9Fm9PGUbt5tMaK78TK294fjxd3WygUjwfxEI8BdtNa L47w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HK7x766l; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kk2-20020a17090b4a0200b0024e1172c1d5si7583850pjb.155.2023.05.29.02.22.54; Mon, 29 May 2023 02:23:06 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HK7x766l; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231771AbjE2JFP (ORCPT + 99 others); Mon, 29 May 2023 05:05:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229628AbjE2JFN (ORCPT ); Mon, 29 May 2023 05:05:13 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5F77591 for ; Mon, 29 May 2023 02:05:12 -0700 (PDT) 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 dfw.source.kernel.org (Postfix) with ESMTPS id 9B04B6135F for ; Mon, 29 May 2023 09:05:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 07B15C4339B; Mon, 29 May 2023 09:05:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1685351111; bh=a0JuTRdYRCCfiZG2Iw5Mnx/pP+lqpKmJlhBMUAjpNL8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=HK7x766l7V56uon1rxaUzwgAf6cZoaiFKntT9oIUJxtajR+3PG//Zw6INfHkCD7YL Q08U2FLyBg3+kfe2Tj4Uzdb5ybjOQkCRLSyYPdFwuYEjjfPu02YmWt5JjwlaqRnmXL AQ5AknK4p5P3KRaCvVHVc5VKPcSB0QDFqempdzu6KkyNuVEDH24/CCs5oWZYQuDx86 0Yqh1Qvt/hXekeLFe9PhSfU2EQLwzaAcAkUIDdGg3oR4S3/5H1r5X+GshQGCQ8xv9q E03Qku3fBBuqL1ZGrW56JvwgsZcqsqUDiQMZlf8c6ET5O6YRnqxjtwFEz1brANpftN qGWoGIX3/ROEg== Date: Mon, 29 May 2023 12:04:46 +0300 From: Mike Rapoport To: Haifeng Xu Cc: akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Michal Hocko Subject: Re: [PATCH] mm/mm_init.c: remove free_area_init_memoryless_node() Message-ID: <20230529090446.GK4967@kernel.org> References: <20230528045720.4835-1-haifeng.xu@shopee.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230528045720.4835-1-haifeng.xu@shopee.com> X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 (added Michal) On Sun, May 28, 2023 at 04:57:20AM +0000, Haifeng Xu wrote: > free_area_init_memoryless_node() is just a wrapper of > free_area_init_node(), remove it to clean up. > > Signed-off-by: Haifeng Xu > --- > mm/mm_init.c | 7 +------ > 1 file changed, 1 insertion(+), 6 deletions(-) > > diff --git a/mm/mm_init.c b/mm/mm_init.c > index 2d91bb52c619..93821824271a 100644 > --- a/mm/mm_init.c > +++ b/mm/mm_init.c > @@ -1752,11 +1752,6 @@ void __init setup_nr_node_ids(void) > } > #endif > > -static void __init free_area_init_memoryless_node(int nid) > -{ > - free_area_init_node(nid); > -} > - > /* > * Some architectures, e.g. ARC may have ZONE_HIGHMEM below ZONE_NORMAL. For > * such cases we allow max_zone_pfn sorted in the descending order > @@ -1867,7 +1862,7 @@ void __init free_area_init(unsigned long *max_zone_pfn) > panic("Cannot allocate %zuB for node %d.\n", > sizeof(*pgdat), nid); > arch_refresh_nodedata(nid, pgdat); > - free_area_init_memoryless_node(nid); > + free_area_init_node(nid); Using a dedicated free_area_init_memoryless_node() wrapper here emphasizes that the node has no memory, but I don't have a strong feeling about keeping it. > > /* > * We do not want to confuse userspace by sysfs > -- > 2.25.1 > -- Sincerely yours, Mike.