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=-9.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, 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 4EB7FC433E2 for ; Mon, 14 Sep 2020 08:49:08 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B5C42206DC for ; Mon, 14 Sep 2020 08:49:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B5C42206DC Authentication-Results: mail.kernel.org; dmarc=none (p=none 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 D089F6B0037; Mon, 14 Sep 2020 04:49:06 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C92286B005A; Mon, 14 Sep 2020 04:49:06 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B5A576B005C; Mon, 14 Sep 2020 04:49:06 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 9BA736B0037 for ; Mon, 14 Sep 2020 04:49:06 -0400 (EDT) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 4E81E181AEF1D for ; Mon, 14 Sep 2020 08:49:06 +0000 (UTC) X-FDA: 77261042292.20.glue77_2804a5227107 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin20.hostedemail.com (Postfix) with ESMTP id 14AE41814ACF5 for ; Mon, 14 Sep 2020 08:49:06 +0000 (UTC) X-HE-Tag: glue77_2804a5227107 X-Filterd-Recvd-Size: 2638 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf04.hostedemail.com (Postfix) with ESMTP for ; Mon, 14 Sep 2020 08:49:05 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id E071BAC46; Mon, 14 Sep 2020 08:49:19 +0000 (UTC) Date: Mon, 14 Sep 2020 10:49:04 +0200 From: Michal Hocko To: Laurent Dufour Cc: akpm@linux-foundation.org, David Hildenbrand , Oscar Salvador , Greg Kroah-Hartman , linux-mm@kvack.org, "Rafael J . Wysocki" , nathanl@linux.ibm.com, cheloha@linux.ibm.com, Tony Luck , Fenghua Yu , linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/3] mm: replace memmap_context by memplug_context Message-ID: <20200914084904.GA16999@dhcp22.suse.cz> References: <20200911134831.53258-1-ldufour@linux.ibm.com> <20200911134831.53258-2-ldufour@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200911134831.53258-2-ldufour@linux.ibm.com> X-Rspamd-Queue-Id: 14AE41814ACF5 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam02 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 Fri 11-09-20 15:48:29, Laurent Dufour wrote: > The memmap_context is used to detect whether a memory operation is due to a > hot-add operation or happening at boot time. > > Makes it general to the hotplug operation, renaming it at memplug_context > and move its define in the corresponding header. > > There is no functional change introduced by this patch I do not want to nit picking on naming but we want to look at this from the initialization POV rather than hotplug. So.... > > Suggested-by: David Hildenbrand > Signed-off-by: Laurent Dufour [...] > diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h > index 375515803cd8..cd2bd21d3a4d 100644 > --- a/include/linux/memory_hotplug.h > +++ b/include/linux/memory_hotplug.h > @@ -15,6 +15,15 @@ struct memory_block; > struct resource; > struct vmem_altmap; > > +/* > + * Memory plugin context, use to differentiate memory added at boot time and > + * hot-plugged memory. > + */ > +enum memplug_context { > + MEMPLUG_EARLY, > + MEMPLUG_HOTPLUG, > +}; /* * Memory initialization context, use to differentiate memory added by * the platform statically or via memory hotplug interface. */ enum meminit_context { MEMINIT_EARLY, MEMINIT_HOTPLUG } -- Michal Hocko SUSE Labs