Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5918950ybi; Tue, 4 Jun 2019 14:49:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqxMgpumqJfAkmOk1PRRgqCi81bLOE8q17ubTgMibznHGvfGmQ7shCY1kY4fPFjn9fEoSWY9 X-Received: by 2002:a17:902:7295:: with SMTP id d21mr26318904pll.299.1559684958285; Tue, 04 Jun 2019 14:49:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559684958; cv=none; d=google.com; s=arc-20160816; b=Syid8z3UBClkKZjLLw2ij2trgrFK9dvcABks2CEXWYA/zol3hFhQa5Rxh/lO1WfybU 6w7kCsy+OdYwWOOA/Ix9VaWMyQdETF9dk5C5q/J5/vaaHuCjt9GgJYpHRjHCgLuB9YMW 3CSDWA5lDG/gENW9A3lHy/uzpLAn4gVtQL1OwakHRc3YepSeRtBNUg0WBfraOsT0sxCA 58IWyn13oyremSLM4cKYMh9R8G5fPP+rDUnaj8Zzb///OlYUcAHQlXfamfknyQb+bWs+ ZOqeC7CHGuYRMFWS+kzNb2gzPw38TeLKbht6/uzYgmBGqhz2OzdRgdngUH1j/s9B/n2r Ku9g== 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:reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=YAOiP57A01Sn4VN1p2tU0pXmqdLPIiJ4XRB9cBH/L60=; b=AZLhumP/B015gX85GTpu51XR0IOhuQt0jitJNoEgcEXVW0X+fzgSJ7UeKl4lRHqiSA r9WbLk4WAeWhYcChGlovYCo38grks5MRl3BxHKy6jFoCWB1WCYVZakKEtvYIrFEISD8O xKsOqvXhjn5Wuf6daTmUSvHDeU2JEj0+03TvzVgulblKGR93dfOwiWPrb6+jNAyWfs3y oUVM5SZPVOGiZEZlbkrZ7XWyKcA7Dm8TmQ9AoCRbq/0KJfqpkc31MuoqdNhDkKNYO85p iTIckbgeggpjZ+2/dD6pgsrLYY6vsesSiHgDNjCplQo+VkNr8nvCZ/IuZDx247ADuitZ omWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=LHVOjJU+; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s24si28134979pfd.78.2019.06.04.14.49.01; Tue, 04 Jun 2019 14:49:18 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=LHVOjJU+; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726474AbfFDVr6 (ORCPT + 99 others); Tue, 4 Jun 2019 17:47:58 -0400 Received: from mail-ed1-f66.google.com ([209.85.208.66]:45504 "EHLO mail-ed1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726305AbfFDVr5 (ORCPT ); Tue, 4 Jun 2019 17:47:57 -0400 Received: by mail-ed1-f66.google.com with SMTP id f20so2553709edt.12; Tue, 04 Jun 2019 14:47:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:reply-to:references:mime-version :content-disposition:in-reply-to:user-agent; bh=YAOiP57A01Sn4VN1p2tU0pXmqdLPIiJ4XRB9cBH/L60=; b=LHVOjJU+PrWUKjw2La9VE1vPKl5KearF9vd1gx+fMOah0NIYnTCpk/hLPywmGuD7Qx ubKVoOSXllgIIOtqhu2gVJ3x9B0/bsgZ7dOqAY3y5Ayi0qhLPf1tZQD8IUflfR/bo3b1 F4TaQlhPSFK4tf44OdTct45QOW1HbhpVKmRS1UPgsRmJ8ykiC6IB1kc0IjzAbHbpYgcW XocfR253q6JmXmpbPH+wSLE5nYqYTiHdUq2ypGGmgfgczCsKHTbAbfTkEuh649zZZ9c/ Obhuc+H39gsisfGYj1xrWFrX2Lyh1bRdUjq62tExuKhoIe4zwnBrI2RwiYnmhdgPNIGz bDHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:reply-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=YAOiP57A01Sn4VN1p2tU0pXmqdLPIiJ4XRB9cBH/L60=; b=NULAeei9khK+CQ3Lbp52QiJxztnZ32IYSoc9ib4IX8i+bXt/GqhGAVNI4e7vXa4ROt GNdBAobfPaup7tehAmkGoxj+ynS0BiBZAu+WSjSMMqXdr5bqBEzzjbClRve8/dipkCmq 4F7GQEQdT9Ax46SO700SO16EkHvg8RjmXeWUXUD+2MjKNJnNK6Tp5wWolrA1uTTbfv26 of59Ci4AloPtYmzdE6SlsD3UpUxNyRvE11gnEXvsrPGhaKc8su+dIXkM746uQmnYD8ut qCgPUK49EE1RS3/3Qw5s5ackjlcxbR04CIIOXz7Rf+KKsPwzjflN8QRu/fc8FHU0ZXFu iM6w== X-Gm-Message-State: APjAAAWGzrG5VDuqRAXENkhGdKKRed7MLRRMbHmRa/aJkFFppQYATV5j RA3U28PmZqe87V8R2ZjTm5lncabqzC0= X-Received: by 2002:a50:bb24:: with SMTP id y33mr38369134ede.116.1559684875305; Tue, 04 Jun 2019 14:47:55 -0700 (PDT) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id n5sm2897404edt.65.2019.06.04.14.47.53 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 04 Jun 2019 14:47:54 -0700 (PDT) Date: Tue, 4 Jun 2019 21:47:53 +0000 From: Wei Yang 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 , Michal Hocko , 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: <20190604214753.utbdrjtjavgi7yhf@master> Reply-To: Wei Yang 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: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 27, 2019 at 01:11:49PM +0200, 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 Reviewed-by: Wei Yang >--- > 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 -- Wei Yang Help you, Help me