Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1855216ybi; Mon, 1 Jul 2019 01:29:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqzWJCz7VQneqs9vr0mztcFuwaiPchD19puxSHyNL3wybopXGUvUHLOPASOelLfMZqjAWEu0 X-Received: by 2002:a65:640d:: with SMTP id a13mr14245384pgv.256.1561969788353; Mon, 01 Jul 2019 01:29:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561969788; cv=none; d=google.com; s=arc-20160816; b=G1AqKvM+V0qeYm7voT19fqhgAn2pzh/JCh69nZr+OV/5Z2BztAHWLlG44VdUug5/E3 4GqX9ah5Z0CcsIb/PSzQaCKdAz0vzswu4D+V6Vl8yzLYCZ9CTdykbNOn9Ml+5Q6RdPIa 5+dltUsK/DkjvTRliIqsXm8a4cWAaZfgYZHoKBhUBm1T8BnoKuQRCY0BRrlvrnQo9UEi 81PH/IS4MdDYoJtJv1qH+LLrAPexeLLKBQtjmJgjjgMeecIAKFj2xbEiA0goFP22xHr3 5BezlKHw0icHssa2TgLEc2DGf26ejWQehlG0J8XEkI3FFLox98VmKlR4KVJpfCzNtEtr dkMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=eXi6yQH8G+hTeFTsFmkYb0RA9aCqp5uVQBWiMGq858Q=; b=ADgy4maJMFqF0ieoI/plf687/FOgloQmHQtebqylJnvcHw2oiK2jjBkgycylOKqeiO bFpklbwnl79k5TNTzcYrRERCt+Rp6S7EGEJSiO600XuVi2lTpSsZ6RNWbPaCQ1V7bPOp CxnjkK5Ch6NHedpDpcmE5RYj2Xs8E762I89o1CKDkvMWGe723AL0tHoGS0YiMCu8khIn I7wtywNS6AaNdsJgimRtpA85/CsyGP80gNahBcjbx9zEukZ2iEPb/rLc6YqCGiTc8SCs wNHG/vEv3lEc0Gf9pTMffp7tsyTHJ1RWXHzKmQGeqZu8pYKk10G+BReH6+somEbFryG3 lGWw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d37si10070512plb.351.2019.07.01.01.29.33; Mon, 01 Jul 2019 01:29:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727933AbfGAIPL (ORCPT + 99 others); Mon, 1 Jul 2019 04:15:11 -0400 Received: from mx2.suse.de ([195.135.220.15]:59830 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727138AbfGAIPL (ORCPT ); Mon, 1 Jul 2019 04:15:11 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 227FEAE60; Mon, 1 Jul 2019 08:15:09 +0000 (UTC) Date: Mon, 1 Jul 2019 10:15:08 +0200 From: Michal Hocko To: David Hildenbrand Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-ia64@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, linux-arm-kernel@lists.infradead.org, akpm@linux-foundation.org, Dan Williams , Wei Yang , Igor Mammedov , Oscar Salvador , Pavel Tatashin , Joonsoo Kim , Qian Cai , Arun KS , Mathieu Malaterre Subject: Re: [PATCH v3 08/11] mm/memory_hotplug: Drop MHP_MEMBLOCK_API Message-ID: <20190701081508.GH6376@dhcp22.suse.cz> References: <20190527111152.16324-1-david@redhat.com> <20190527111152.16324-9-david@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190527111152.16324-9-david@redhat.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon 27-05-19 13:11:49, David Hildenbrand wrote: > No longer needed, the callers of arch_add_memory() can handle this > manually. > > Cc: Andrew Morton > Cc: David Hildenbrand > Cc: Michal Hocko > Cc: Oscar Salvador > Cc: Pavel Tatashin > Cc: Wei Yang > Cc: Joonsoo Kim > Cc: Qian Cai > Cc: Arun KS > Cc: Mathieu Malaterre > Signed-off-by: David Hildenbrand Acked-by: Michal Hocko > --- > include/linux/memory_hotplug.h | 8 -------- > mm/memory_hotplug.c | 9 +++------ > 2 files changed, 3 insertions(+), 14 deletions(-) > > diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h > index 2d4de313926d..2f1f87e13baa 100644 > --- a/include/linux/memory_hotplug.h > +++ b/include/linux/memory_hotplug.h > @@ -128,14 +128,6 @@ extern void arch_remove_memory(int nid, u64 start, u64 size, > extern void __remove_pages(struct zone *zone, unsigned long start_pfn, > unsigned long nr_pages, struct vmem_altmap *altmap); > > -/* > - * Do we want sysfs memblock files created. This will allow userspace to online > - * and offline memory explicitly. Lack of this bit means that the caller has to > - * call move_pfn_range_to_zone to finish the initialization. > - */ > - > -#define MHP_MEMBLOCK_API (1<<0) > - > /* reasonably generic interface to expand the physical pages */ > extern int __add_pages(int nid, unsigned long start_pfn, unsigned long nr_pages, > struct mhp_restrictions *restrictions); > diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c > index b1fde90bbf19..9a92549ef23b 100644 > --- a/mm/memory_hotplug.c > +++ b/mm/memory_hotplug.c > @@ -251,7 +251,7 @@ void __init register_page_bootmem_info_node(struct pglist_data *pgdat) > #endif /* CONFIG_HAVE_BOOTMEM_INFO_NODE */ > > static int __meminit __add_section(int nid, unsigned long phys_start_pfn, > - struct vmem_altmap *altmap, bool want_memblock) > + struct vmem_altmap *altmap) > { > int ret; > > @@ -294,8 +294,7 @@ int __ref __add_pages(int nid, unsigned long phys_start_pfn, > } > > for (i = start_sec; i <= end_sec; i++) { > - err = __add_section(nid, section_nr_to_pfn(i), altmap, > - restrictions->flags & MHP_MEMBLOCK_API); > + err = __add_section(nid, section_nr_to_pfn(i), altmap); > > /* > * EEXIST is finally dealt with by ioresource collision > @@ -1067,9 +1066,7 @@ static int online_memory_block(struct memory_block *mem, void *arg) > */ > int __ref add_memory_resource(int nid, struct resource *res) > { > - struct mhp_restrictions restrictions = { > - .flags = MHP_MEMBLOCK_API, > - }; > + struct mhp_restrictions restrictions = {}; > u64 start, size; > bool new_node = false; > int ret; > -- > 2.20.1 > -- Michal Hocko SUSE Labs