Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1002704pxb; Thu, 4 Mar 2021 00:09:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJzFnYrNQ3RQMQUukfQE29M3j5nRDcQZp1QyK6Iek63b2YANJWMgH93PpHr6FC90sFbgTzzd X-Received: by 2002:a17:906:70d4:: with SMTP id g20mr2968951ejk.361.1614845392335; Thu, 04 Mar 2021 00:09:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614845392; cv=none; d=google.com; s=arc-20160816; b=IZVDJxvXWTjdtHWgc8mz2QQLGfm57FI4zT8zAVMdoyh+070EdzGsXBZ8y8VjR4Scpv dTbQaik81YxuUFux4pmOzPGgIHturQa0zZWBhR4UIygIdYYa/k+1R04C0F1yTWlQJcc1 y8w+CF13xU/ZATRoF6O2H0aI5NKJTESalny2FHPihuWA1aGXM1uX0n1m8KMLMpms28+B G+MNPqggxjir0pf2RuR5j6CnFpuLypijbqSDOOfYUuZuoITKkQx0gGAHiQck9rJTBzQY a77t1jTtCBhIiwo6+sbekrC+9MSLXpXOgLWC08GfA/r+hWR6vFCgRDxb5rLsF1fDsPNf 9p2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=cBrDyODWb9o0wKTGlYEQJLE0F3iUV2itXWKb5sgDsGI=; b=Z0U9CjOLraCbf5U+eOfKRuzmmoJYQxripFLGoYGqXgNrkWtiB8RHc/Ehi/+zlv7nSH 7qAD4MCq4TQL02KZL2wsK2CYelRrC8qS1Q2mUF98KfgHksQ1mAXqmVzpX3FbYy1DSSRF gB4HriFgm2AZjXqZHdimUM5DMg5DC7iuIrzB1VTSK7l2rUNV7U6M7f/XSuDNpyGxtKkL CMduKNiY7eEYtFVOrDL/ksXnRcsqenk61pfA3ZRiTsuHDLZvHr6Oaoyk+ci5O6rlcg1v 72fNwAUdIK0OjzXwhlCnzPvLBUrYKLcOAkxMnZmiNWSkpcEDlXQWR3OqItTjsdYpN7xd e5iA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=S32DEI3w; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o9si8660019eja.264.2021.03.04.00.09.29; Thu, 04 Mar 2021 00:09:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=S32DEI3w; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1357794AbhCCLY0 (ORCPT + 99 others); Wed, 3 Mar 2021 06:24:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244735AbhCCCqc (ORCPT ); Tue, 2 Mar 2021 21:46:32 -0500 Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 03BFBC061788; Tue, 2 Mar 2021 18:45:18 -0800 (PST) Received: by mail-pl1-x629.google.com with SMTP id s7so6019191plg.5; Tue, 02 Mar 2021 18:45:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=cBrDyODWb9o0wKTGlYEQJLE0F3iUV2itXWKb5sgDsGI=; b=S32DEI3weYwTGnPZ8gv3lwj9JSyyd87UoScYSPpyk+56v3bzARJ7vegfvrF2nPoCfX 4JG5b1M4DIWdFv9pg/4biqSPRF07OXjCohzt+aVYyNM1poxiskVpkV5n6BzciRVZTXwZ FraJjTzMYwywR5pzTMOGqGIKmHgz8UA3+DQH3CCwRwHkDhbs+vuBeZ4bm653zyBNLcQM FYGah9blETvflovotwrZ7xPbEqmGvG7iFtPmkcFNaqUtZH+AO5/ppGzI7BNSh8qMuq09 Wj+yrIsLqAz9x5UiM/DO43tUdFHrbxNLCk3NL5on8iv+KIFocI/YMzpPuy2M8ye7rVSY U36A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=cBrDyODWb9o0wKTGlYEQJLE0F3iUV2itXWKb5sgDsGI=; b=l6QnMWhxewAa43XtWtaK/xUAFoelphKhO2qL6kqOlTQVTRy/0BcRiDnXzlnwm3WqGy lxQ2BQwrBG69wleF27+q+Tu1FIzc0VS9V9Zg3A4UydNYDVzdJ70YfNrh6mxOx7CBIG8c 1cTlGlqkuPw5WnvOiHaXNnQlZMYJayyzXUs5KbSES9tTu8b6Vuhz92TMgsx7OOuXPHXU dlDee7Ax12HOlHk122hL0c7leilFdNyZ42y5fPuBrXQ4HvtGRhnUPCgtLltLN0QoL/XX yd5iGvfmo1ZneUxCwWD0RVlmTr5FL/4H+JYEtHLd9DysR3V1hEe14rEJk3gSp806h7ER SsoA== X-Gm-Message-State: AOAM531v9wqi59+cGVy/9L0EHSH8juvHCSvVQtgx8g/mFpyCGzYEeNVV Aym0PtZ1FisdxqDHX6a9tGF2WIBVXCt+Qw== X-Received: by 2002:a17:902:7597:b029:e4:156c:ba97 with SMTP id j23-20020a1709027597b02900e4156cba97mr6223687pll.63.1614739517398; Tue, 02 Mar 2021 18:45:17 -0800 (PST) Received: from f8ffc2228008.ant.amazon.com ([54.240.193.1]) by smtp.gmail.com with ESMTPSA id y15sm915385pgi.31.2021.03.02.18.45.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 02 Mar 2021 18:45:14 -0800 (PST) Subject: Re: [PATCH v17 1/9] mm: memory_hotplug: factor out bootmem core functions to bootmem_info.c To: Muchun Song , 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, mhocko@suse.com, song.bao.hua@hisilicon.com, david@redhat.com, naoya.horiguchi@nec.com, joao.m.martins@oracle.com Cc: duanxiongchun@bytedance.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, Miaohe Lin References: <20210225132130.26451-1-songmuchun@bytedance.com> <20210225132130.26451-2-songmuchun@bytedance.com> From: "Singh, Balbir" Message-ID: Date: Wed, 3 Mar 2021 13:45:00 +1100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: <20210225132130.26451-2-songmuchun@bytedance.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 26/2/21 12:21 am, 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 ... > diff --git a/mm/bootmem_info.c b/mm/bootmem_info.c > new file mode 100644 > index 000000000000..fcab5a3f8cc0 > --- /dev/null > +++ b/mm/bootmem_info.c > @@ -0,0 +1,124 @@ > +// SPDX-License-Identifier: GPL-2.0 > +/* > + * linux/mm/bootmem_info.c > + * > + * Copyright (C) Looks like incomplete Balbir Singh