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 F031DC43461 for ; Mon, 14 Sep 2020 08:49:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BAFB6206DC for ; Mon, 14 Sep 2020 08:49:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726210AbgINItJ (ORCPT ); Mon, 14 Sep 2020 04:49:09 -0400 Received: from mx2.suse.de ([195.135.220.15]:53396 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726128AbgINItG (ORCPT ); Mon, 14 Sep 2020 04:49:06 -0400 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> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michal Hocko Date: Mon, 14 Sep 2020 08:49:04 +0000 Subject: Re: [PATCH 1/3] mm: replace memmap_context by memplug_context Message-Id: <20200914084904.GA16999@dhcp22.suse.cz> List-Id: References: <20200911134831.53258-1-ldufour@linux.ibm.com> <20200911134831.53258-2-ldufour@linux.ibm.com> In-Reply-To: <20200911134831.53258-2-ldufour@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 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