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 X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 67495C433E9 for ; Thu, 11 Mar 2021 08:54:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 17F1264FB1 for ; Thu, 11 Mar 2021 08:54:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231844AbhCKIyG (ORCPT ); Thu, 11 Mar 2021 03:54:06 -0500 Received: from mx2.suse.de ([195.135.220.15]:37956 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231639AbhCKIxg (ORCPT ); Thu, 11 Mar 2021 03:53:36 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1615452814; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=iMdDHdKQUwFUd6NvEWE8XF/SFceIsCZgywYTHi2Bsgo=; b=Mb2OWgKtA5moO/qXD2QpF0bvDUKXZ2yZfJKd07VICB6jBiVP7wLhht1TgkDfmZ7X3B/R+5 nDaI2S9Gz29aEQkTqFPHPbBgpgnjhG1GFHb+HfDIzm35kE93x6bhBwmNCO5yCi2Ujh0rp6 0F71Kkr+B0dCPdhiJLkUALRLwYgqKiI= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 60A98AB8C; Thu, 11 Mar 2021 08:53:34 +0000 (UTC) Date: Thu, 11 Mar 2021 09:53:33 +0100 From: Michal Hocko To: Muchun Song Cc: Jonathan Corbet , Mike Kravetz , Thomas Gleixner , Ingo Molnar , bp@alien8.de, x86@kernel.org, hpa@zytor.com, dave.hansen@linux.intel.com, luto@kernel.org, Peter Zijlstra , Alexander Viro , Andrew Morton , paulmck@kernel.org, mchehab+huawei@kernel.org, pawan.kumar.gupta@linux.intel.com, Randy Dunlap , oneukum@suse.com, anshuman.khandual@arm.com, jroedel@suse.de, Mina Almasry , David Rientjes , Matthew Wilcox , Oscar Salvador , "Song Bao Hua (Barry Song)" , David Hildenbrand , HORIGUCHI =?utf-8?B?TkFPWUEo5aCA5Y+jIOebtOS5nyk=?= , Joao Martins , Xiongchun duan , linux-doc@vger.kernel.org, LKML , Linux Memory Management List , linux-fsdevel , Miaohe Lin , Chen Huang , Bodeddula Balasubramaniam Subject: Re: [External] Re: [PATCH v18 1/9] mm: memory_hotplug: factor out bootmem core functions to bootmem_info.c Message-ID: References: <20210308102807.59745-1-songmuchun@bytedance.com> <20210308102807.59745-2-songmuchun@bytedance.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 11-03-21 16:45:51, Muchun Song wrote: > On Thu, Mar 11, 2021 at 10:58 AM Muchun Song wrote: > > > > On Wed, Mar 10, 2021 at 10:14 PM Michal Hocko wrote: > > > > > > [I am sorry for a late review] > > > > Thanks for your review. > > > > > > > > On Mon 08-03-21 18:27:59, Muchun Song wrote: > > > > Move bootmem info registration common API to individual bootmem_info.c. > > > > And we will use {get,put}_page_bootmem() to initialize the page for the > > > > vmemmap pages or free the vmemmap pages to buddy in the later patch. > > > > So move them out of CONFIG_MEMORY_HOTPLUG_SPARSE. This is just code > > > > movement without any functional change. > > > > > > > > Signed-off-by: Muchun Song > > > > Acked-by: Mike Kravetz > > > > Reviewed-by: Oscar Salvador > > > > Reviewed-by: David Hildenbrand > > > > Reviewed-by: Miaohe Lin > > > > Tested-by: Chen Huang > > > > Tested-by: Bodeddula Balasubramaniam > > > > > > Separation from memory_hotplug.c is definitely a right step. I am > > > wondering about the config dependency though > > > [...] > > > > diff --git a/mm/Makefile b/mm/Makefile > > > > index 72227b24a616..daabf86d7da8 100644 > > > > --- a/mm/Makefile > > > > +++ b/mm/Makefile > > > > @@ -83,6 +83,7 @@ obj-$(CONFIG_SLUB) += slub.o > > > > obj-$(CONFIG_KASAN) += kasan/ > > > > obj-$(CONFIG_KFENCE) += kfence/ > > > > obj-$(CONFIG_FAILSLAB) += failslab.o > > > > +obj-$(CONFIG_HAVE_BOOTMEM_INFO_NODE) += bootmem_info.o > > > > > > I would have expected this would depend on CONFIG_SPARSE. > > > BOOTMEM_INFO_NODE is really an odd thing to depend on here. There is > > > some functionality which requires the node info but that can be gated > > > specifically. Or what is the thinking behind? > > I have tried this. And I find that it is better to depend on > BOOTMEM_INFO_NODE instead of SPARSEMEM. > > If we enable SPARSEMEM but disable HAVE_BOOTMEM_INFO_NODE, > the bootmem_info.c also is compiled. Actually, we do not > need those functions on other architectures. And these > functions are also related to bootmem info. So it may be > more reasonable to depend on BOOTMEM_INFO_NODE. > Just my thoughts. If BOOTMEM_INFO_NODE is disbabled then bootmem_info.c would be effectivelly only {get,put}_page_bootmem, no? -- Michal Hocko SUSE Labs