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=-6.7 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 9DD1DC004C9 for ; Tue, 7 May 2019 21:27:40 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1BAA8208CB for ; Tue, 7 May 2019 21:27:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=intel-com.20150623.gappssmtp.com header.i=@intel-com.20150623.gappssmtp.com header.b="niDOApxC" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1BAA8208CB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 44zCPQ460yzDqH2 for ; Wed, 8 May 2019 07:27:38 +1000 (AEST) Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=intel.com (client-ip=2607:f8b0:4864:20::241; helo=mail-oi1-x241.google.com; envelope-from=dan.j.williams@intel.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=intel-com.20150623.gappssmtp.com header.i=@intel-com.20150623.gappssmtp.com header.b="niDOApxC"; dkim-atps=neutral Received: from mail-oi1-x241.google.com (mail-oi1-x241.google.com [IPv6:2607:f8b0:4864:20::241]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 44zCMV5PPqzDqHZ for ; Wed, 8 May 2019 07:25:58 +1000 (AEST) Received: by mail-oi1-x241.google.com with SMTP id l203so13547570oia.3 for ; Tue, 07 May 2019 14:25:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=WrWLvelkD+mNuwk6Y9UcbtBZNb2SYcW2Bv4WekgkKa4=; b=niDOApxCFCnbMJ6JJnVXhAHXcDpvPX0VOIgX598FWvGb20NBKEjOLMGunPMCtT8w07 CCUklL9XVIwM7XeXqt4R3SwqsQHc45UygSnPA7Vo5/Vcu6vZ67h+LQUBL4TP5gSuL9M8 yOCXLz75NneW+bv+FADtD51VYmKLmjMo3ehqiItMgltR15OKUblt6t5oABGwZobyxZvY uoFoyjDvezyaKUeVwPy/0Ey+uAiBGDemhG0P5C7K98cYeXWIsdK4jIuVnW31DT+YwKBS axg9qxXBQfbqQqPbEvS+gX/40W5Qtk0I8uy1AfjO2oRgk00fIcb94S9PEZI5nxKZfbNK pzwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=WrWLvelkD+mNuwk6Y9UcbtBZNb2SYcW2Bv4WekgkKa4=; b=lgxCEMnJ3rfAN7ZETHP10frKFwIYOYbPPnNb0GaIQpy7BESIl3JTsTPCLaLQS5xJOO bYp9h+9t3hh3CvxLvTUgZz82+x9xqsya7OW1VKnUCjJAfmixzSumowVwADDrxWqGLr47 LcGsp7cwlOgocRxIQ/oUmKgr9OrZr40zM4G9kCP0h/GhMOIG/CmNxk/XS+xkUkfNPdWd VDjEDYiKxiA/I13g34j2CjOt/1XSQjY2yT9efFQtpYtRot0DSSeEkhx1dUkDylTxQq5M HSNLif4CnWkeOnyR2uum3Hv0Pz0RkadLXY/pXluG8t9XVt8gB/ZAefvcS1MZmnEuceS8 4H0g== X-Gm-Message-State: APjAAAWiNE3nNkk6ZUGcrE4IC9PAga7YG3FN587XCp00X0SimEQbKmUa YXzHNVEN5jYaDVN43ipsELEHwAeMr2CQuQV0gm9ULA== X-Google-Smtp-Source: APXvYqzSvx7ljHyQCsbhoL+yq/IdpsbLQ8T4Uq4lItlX5+hsXeerJKyAq6+adzcHddCXxdDwo8WpxyHJeKyxh7hOkws= X-Received: by 2002:aca:220f:: with SMTP id b15mr357563oic.73.1557264355934; Tue, 07 May 2019 14:25:55 -0700 (PDT) MIME-Version: 1.0 References: <20190507183804.5512-1-david@redhat.com> <20190507183804.5512-6-david@redhat.com> In-Reply-To: From: Dan Williams Date: Tue, 7 May 2019 14:25:45 -0700 Message-ID: Subject: Re: [PATCH v2 5/8] mm/memory_hotplug: Drop MHP_MEMBLOCK_API To: David Hildenbrand Content-Type: text/plain; charset="UTF-8" X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Oscar Salvador , linux-s390 , Michal Hocko , linux-ia64@vger.kernel.org, Pavel Tatashin , Linux-sh , Mathieu Malaterre , Linux Kernel Mailing List , Wei Yang , Linux MM , Qian Cai , Arun KS , Andrew Morton , linuxppc-dev , Joonsoo Kim Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Tue, May 7, 2019 at 2:24 PM David Hildenbrand wrote: > > On 07.05.19 23:19, Dan Williams wrote: > > On Tue, May 7, 2019 at 11:38 AM 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 > >> --- > >> 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 e1637c8a0723..107f72952347 100644 > >> --- a/mm/memory_hotplug.c > >> +++ b/mm/memory_hotplug.c > >> @@ -250,7 +250,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; > >> > >> @@ -293,8 +293,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 > >> @@ -1066,9 +1065,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 = {}; > > > > With mhp_restrictions.flags no longer needed, can we drop > > mhp_restrictions and just go back to a plain @altmap argument? > > > > Oscar wants to use it to configure from where to allocate vmemmaps. That > was the original driver behind it. > Ah, ok, makes sense.