Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1871588ybi; Mon, 1 Jul 2019 01:52:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqz5eB8mOlo4Se9izBJ9aduD8e+bCxjmyf6mxaF6sSwCP+08DJg8HcHHOQSe5Mnfjk3OcSSm X-Received: by 2002:a65:4945:: with SMTP id q5mr24051561pgs.9.1561971175763; Mon, 01 Jul 2019 01:52:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561971175; cv=none; d=google.com; s=arc-20160816; b=TUn/6wXRzfOCiyObADreJVZTKZdfUEnhkny0oN42XCVT91Ihg/dOLsJq8/w79fZMB/ VkEWkTDVEY80q7+Hu79samOp/LuLLqQG5FLILKC57eH/rog4JUBDkniH7eCS5f6+lcNn Iw1hM2mF/62GrulSkq2qve2L0HUKnNso/NRAwxq5k+Kcd7fCqul/t1EORh49fQr8Hy5f kRS4oL4WDj8JRCZ/ZMznOD4v1TOUeBELJtZhrgh22uMRowTJrg/Kh4BbKzn6ulQYQ1jQ UrjIwfYHOjBEnut90wgcA0Sw0OFqlGX4aYMg4Gb9jJpwjSByh6lrtYb8Sem5xM3PPCxc vkCg== 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=JEej5XKfmDYhCLRfey3JFTW9Om3gnuSkjK+xcG6vL/k=; b=nFlhlUaofn4tsJem/CvHerRZZB+nU+NqivD2kAIYG+OkpSBynCY2B+tSxyd+NhR1Hh 7sQligGtFZjtCO1Nee3xDtCViCOZwY6WJ5AoRrfv3vBuusisKz2mrs58vRENtp938f2P Un5BVr3j7sljnk2fkLgTe4BECZqrlZRJYmOkWhHA1dsmAQ1o4Ude522IsJyZ13dA54+D o53+RU/uf53FOXh2UwTlLo9o0X6UVPPWTfNi2P3O/Gyj8YTiRQ5IvI7Jmpi1N/7Eaw5T BMSTdOAxRger9Z1is37gOLmMA+0fPLVJTmYChtctaaO7OxcSNNTa7v/qkEG9wCsD4Gr6 ZQ7w== 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 y5si9922021pjw.61.2019.07.01.01.52.39; Mon, 01 Jul 2019 01:52:55 -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 S1728149AbfGAIwd (ORCPT + 99 others); Mon, 1 Jul 2019 04:52:33 -0400 Received: from mx2.suse.de ([195.135.220.15]:41964 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726442AbfGAIwd (ORCPT ); Mon, 1 Jul 2019 04:52:33 -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 AE529AD23; Mon, 1 Jul 2019 08:52:31 +0000 (UTC) Date: Mon, 1 Jul 2019 10:52:31 +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 Subject: Re: [PATCH v3 11/11] mm/memory_hotplug: Remove "zone" parameter from sparse_remove_one_section Message-ID: <20190701085231.GK6376@dhcp22.suse.cz> References: <20190527111152.16324-1-david@redhat.com> <20190527111152.16324-12-david@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190527111152.16324-12-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:52, David Hildenbrand wrote: > The parameter is unused, so let's drop it. Memory removal paths should > never care about zones. This is the job of memory offlining and will > require more refactorings. > > Reviewed-by: Dan Williams > Signed-off-by: David Hildenbrand Acked-by: Michal Hocko > --- > include/linux/memory_hotplug.h | 2 +- > mm/memory_hotplug.c | 2 +- > mm/sparse.c | 4 ++-- > 3 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h > index 2f1f87e13baa..1a4257c5f74c 100644 > --- a/include/linux/memory_hotplug.h > +++ b/include/linux/memory_hotplug.h > @@ -346,7 +346,7 @@ extern void move_pfn_range_to_zone(struct zone *zone, unsigned long start_pfn, > extern bool is_memblock_offlined(struct memory_block *mem); > extern int sparse_add_one_section(int nid, unsigned long start_pfn, > struct vmem_altmap *altmap); > -extern void sparse_remove_one_section(struct zone *zone, struct mem_section *ms, > +extern void sparse_remove_one_section(struct mem_section *ms, > unsigned long map_offset, struct vmem_altmap *altmap); > extern struct page *sparse_decode_mem_map(unsigned long coded_mem_map, > unsigned long pnum); > diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c > index 82136c5b4c5f..e48ec7b9dee2 100644 > --- a/mm/memory_hotplug.c > +++ b/mm/memory_hotplug.c > @@ -524,7 +524,7 @@ static void __remove_section(struct zone *zone, struct mem_section *ms, > start_pfn = section_nr_to_pfn((unsigned long)scn_nr); > __remove_zone(zone, start_pfn); > > - sparse_remove_one_section(zone, ms, map_offset, altmap); > + sparse_remove_one_section(ms, map_offset, altmap); > } > > /** > diff --git a/mm/sparse.c b/mm/sparse.c > index d1d5e05f5b8d..1552c855d62a 100644 > --- a/mm/sparse.c > +++ b/mm/sparse.c > @@ -800,8 +800,8 @@ static void free_section_usemap(struct page *memmap, unsigned long *usemap, > free_map_bootmem(memmap); > } > > -void sparse_remove_one_section(struct zone *zone, struct mem_section *ms, > - unsigned long map_offset, struct vmem_altmap *altmap) > +void sparse_remove_one_section(struct mem_section *ms, unsigned long map_offset, > + struct vmem_altmap *altmap) > { > struct page *memmap = NULL; > unsigned long *usemap = NULL; > -- > 2.20.1 -- Michal Hocko SUSE Labs