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=-13.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 82D60C433DB for ; Thu, 11 Mar 2021 02:58:49 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id BB92C64FC3 for ; Thu, 11 Mar 2021 02:58:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BB92C64FC3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=bytedance.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id C38388D0267; Wed, 10 Mar 2021 21:58:47 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id BE8428D0250; Wed, 10 Mar 2021 21:58:47 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A3A9B8D0267; Wed, 10 Mar 2021 21:58:47 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0248.hostedemail.com [216.40.44.248]) by kanga.kvack.org (Postfix) with ESMTP id 8C46F8D0250 for ; Wed, 10 Mar 2021 21:58:47 -0500 (EST) Received: from smtpin16.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 4982F585F for ; Thu, 11 Mar 2021 02:58:47 +0000 (UTC) X-FDA: 77906085894.16.BD70AFF Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) by imf06.hostedemail.com (Postfix) with ESMTP id AF879C0001EE for ; Thu, 11 Mar 2021 02:58:45 +0000 (UTC) Received: by mail-wm1-f46.google.com with SMTP id j4-20020a05600c4104b029010c62bc1e20so11909895wmi.3 for ; Wed, 10 Mar 2021 18:58:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=GRM9zMw9cONpV3FPTOs+yqjYIo2ZpevTzYckbkAXLwQ=; b=Cnwj1JgoXGJEI1UB44KCDg0G/iPkB97ChLiwZXSc7SGMq/dWa0QyuLMXKMCUIxGaOH ItTaIc3lGmgfbHSbK1AY3fk/FD7iloS2NCnboWriNBG0SVU/vWyZxIInBWmq2R7X0Wxc kBLy5p1MzlIGdrtNf4dV+a/5kmSlHsrDNZYElujlbCjzgwf7Rrg2iK6lOq99qvFlbcVZ KGFjkwCawTLS0XTxHCmxC/j0J1rdGVfFqFb9F9cN6L28+HKDwmlOoRWVaNnqWefwPm6+ 5Ug7SJUfL5h037uhRzXrP4mH7/nw44sQwU/OEU+tjGqt8drUSPtEtQlH3Fcz6BZZEQK1 1sbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=GRM9zMw9cONpV3FPTOs+yqjYIo2ZpevTzYckbkAXLwQ=; b=FhrDMaAN7URRmu5AgNp9xkxkZWAEXE4422VCflhAPmtMi3AQr/fk9+8k+dYpPI3Bdy yhTRpMRlsEXDcPR+eDInNQ+lUARzParE55fWI1cD/06XzyIMZmrFmHwwNkhwq5ZMjgAu hILncUBx+d6zq8TpZHdFmw4u7TDeatX46xlqOJ+2H4D8QkC6ElPyaDVecObuffQbaJHv IvYgFiLhlNBipnFoZgbaxXt4Hs8nsz4THKto+NbhizJqNI4QCzs8ornGavewQhonz8Ft VY/0NalJEWsb+OxhHWYfMWvq9r3Cdu0hN9VUsPbimJpA0RA6blQ+u6fHcF1CoyiDuVjN Q2JQ== X-Gm-Message-State: AOAM5316P/NlyDpuS5bxLP+Nbe8oeMSWMJP5bIFlxaszRjf5q0abZ4/I 4IbMr6hJFizWgwU5spJGlSLxa5Ih34wJ6umXQWhu/Q== X-Google-Smtp-Source: ABdhPJxp5FRGwwb/+YpsrWUrU3Vq6fcoiitqZQLceHJQwTGgs34sWTNe0Nu7XmZOhhqlvJ2FvmXomaRxAk4sOigOwvw= X-Received: by 2002:a1c:a916:: with SMTP id s22mr6202421wme.82.1615431523833; Wed, 10 Mar 2021 18:58:43 -0800 (PST) MIME-Version: 1.0 References: <20210308102807.59745-1-songmuchun@bytedance.com> <20210308102807.59745-2-songmuchun@bytedance.com> In-Reply-To: From: Muchun Song Date: Thu, 11 Mar 2021 10:58:07 +0800 Message-ID: Subject: Re: [External] Re: [PATCH v18 1/9] mm: memory_hotplug: factor out bootmem core functions to bootmem_info.c To: Michal Hocko 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 , =?UTF-8?B?SE9SSUdVQ0hJIE5BT1lBKOWggOWPoyDnm7TkuZ8p?= , Joao Martins , Xiongchun duan , linux-doc@vger.kernel.org, LKML , Linux Memory Management List , linux-fsdevel , Miaohe Lin , Chen Huang , Bodeddula Balasubramaniam Content-Type: text/plain; charset="UTF-8" X-Stat-Signature: kuo5bnsp3pw41wm4msqopbs5siecwjxs X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: AF879C0001EE Received-SPF: none (bytedance.com>: No applicable sender policy available) receiver=imf06; identity=mailfrom; envelope-from=""; helo=mail-wm1-f46.google.com; client-ip=209.85.128.46 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1615431525-317200 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: 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? At first my idea was to free vmemmap pages through the bootmem interface. My first instinct is to rely on BOOTMEM_INFO_NODE. It makes sense to me to depend on CONFIG_SPARSE. I will update this in the next version. Thanks. > > This doesn't matter right now because it seems that the *_page_bootmem > is only used by x86 outside of the memory hotplug. > > Other than that looks good to me. > -- > Michal Hocko > SUSE Labs