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=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 96795C433DB for ; Wed, 10 Mar 2021 14:15:05 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2A03464FDF for ; Wed, 10 Mar 2021 14:15:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2A03464FDF Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 91D978D01B2; Wed, 10 Mar 2021 09:15:04 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 8F5048D01A6; Wed, 10 Mar 2021 09:15:04 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 795518D01B2; Wed, 10 Mar 2021 09:15:04 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0172.hostedemail.com [216.40.44.172]) by kanga.kvack.org (Postfix) with ESMTP id 5BDD98D01A6 for ; Wed, 10 Mar 2021 09:15:04 -0500 (EST) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 0D47B6D9D for ; Wed, 10 Mar 2021 14:15:04 +0000 (UTC) X-FDA: 77904161328.20.DFE4D21 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf10.hostedemail.com (Postfix) with ESMTP id C1EA24080F56 for ; Wed, 10 Mar 2021 14:14:55 +0000 (UTC) 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=1615385697; 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=PsgN0DLBzJSs8dxWX8jTU+wIyrjJ0g+0prudfyao9mI=; b=Tvrh7P5wQ54v3pcp4SSdZktDbXaGQxnTqh5w1+b5YXcC9xj3PxbzzEaa0nRg8xuUBhUx6F mVAAT+wTOiHORW7XCiJ5OKfFDqN7cTZSNUdy5453SIY4RCOmf3mcYh/PO/KDFinvgkn1Xg Im/jUaDXWzfu7BnsmFD6m2cFS5qbi9A= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 64687AEB6; Wed, 10 Mar 2021 14:14:57 +0000 (UTC) Date: Wed, 10 Mar 2021 15:14:56 +0100 From: Michal Hocko To: Muchun Song Cc: corbet@lwn.net, mike.kravetz@oracle.com, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, x86@kernel.org, hpa@zytor.com, dave.hansen@linux.intel.com, luto@kernel.org, peterz@infradead.org, viro@zeniv.linux.org.uk, akpm@linux-foundation.org, paulmck@kernel.org, mchehab+huawei@kernel.org, pawan.kumar.gupta@linux.intel.com, rdunlap@infradead.org, oneukum@suse.com, anshuman.khandual@arm.com, jroedel@suse.de, almasrymina@google.com, rientjes@google.com, willy@infradead.org, osalvador@suse.de, song.bao.hua@hisilicon.com, david@redhat.com, naoya.horiguchi@nec.com, joao.m.martins@oracle.com, duanxiongchun@bytedance.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, Miaohe Lin , Chen Huang , Bodeddula Balasubramaniam Subject: 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: <20210308102807.59745-2-songmuchun@bytedance.com> X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: C1EA24080F56 X-Stat-Signature: tx3rbfxpprw4r5gq1xounniyd6ygc5uz Received-SPF: none (suse.com>: No applicable sender policy available) receiver=imf10; identity=mailfrom; envelope-from=""; helo=mx2.suse.de; client-ip=195.135.220.15 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1615385695-257611 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: [I am sorry for a late 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? 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