Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1750075imm; Thu, 21 Jun 2018 01:34:44 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLl/F7OaQfDSpCOBXVs7EQrhFllHVuvpvsuCvBL2U1y07uDZPtAEfbxEQX9lS08jVs2E/4F X-Received: by 2002:a65:5807:: with SMTP id g7-v6mr21660264pgr.259.1529570084040; Thu, 21 Jun 2018 01:34:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529570084; cv=none; d=google.com; s=arc-20160816; b=LlD8+22JI15e2MG6JFMHT+TydXJjndxq17opYPlQRS72lfB/zKIjIXps0JeHk+js0N XYG22MiXeV4BwHYQ/B9NCCW97mXDsm8pXk4nQlokulB997G7O8xs30mKYlecBHcnGcXu +Mv0UWwYXDX2GU0tSo7YHrLOjIykKHyQq1zWizo0A68Syo+xFNEtbHW1+ZmdoJ+rJUw7 12LFHdv4l/uV04Yu6ucKTazb/owFbbRWn85nMqZaRR5O//JlWQLqRKzffe6gT+D2uoNl PYpBA+gsgSmY9Kp5Weoo48IVKtywOYjzb06MGDeozlWhmvEIoJclNIKrcYWFclzJx9yx 1daQ== 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:arc-authentication-results; bh=gulAXJGa0Cfukm78gJJOH7yBd0YiTu0rEQKBED40ip0=; b=uvJmu5pVCVP9kaxIzlSuvZM+O9+bV1FidEscX0DR6J6HBI7tA4CuwYvI9l4d/hBhCF u19KfQbTmK/VoWsDH2/twSXMsnnDhI8l9oh73LQ50snmpy4yWA5hd/xuNLamvAY36rKG FOdc165N+L4VwSGAenDhr7ZXQw2Xu6dFI9wse19syODnqMCNMPVrFKPAIUJabQU+FmPR 1A3I2XdufZfe1HAObajF6VivRm+OzPRLCuvnMGUuwsoPUSIbDvMKyk40Ov0eCs7fSbGH dJSZMUB6lw6yyV2dRR/70ZkYnMoGySi7qk4Bn4PybuCeM0MjUfVhD8TjbtUNtwgyBKPP HtYQ== 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 9-v6si4186324plb.30.2018.06.21.01.34.29; Thu, 21 Jun 2018 01:34:44 -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 S932802AbeFUIdC (ORCPT + 99 others); Thu, 21 Jun 2018 04:33:02 -0400 Received: from mx2.suse.de ([195.135.220.15]:39416 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932687AbeFUIdA (ORCPT ); Thu, 21 Jun 2018 04:33:00 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext-too.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 30A0CAF9A; Thu, 21 Jun 2018 08:32:59 +0000 (UTC) Date: Thu, 21 Jun 2018 10:32:58 +0200 From: Michal Hocko To: osalvador@techadventures.net Cc: akpm@linux-foundation.org, vbabka@suse.cz, pasha.tatashin@oracle.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Oscar Salvador , Reza Arbab Subject: Re: [PATCH 0/4] Small cleanup for memoryhotplug Message-ID: <20180621083258.GF10465@dhcp22.suse.cz> References: <20180601125321.30652-1-osalvador@techadventures.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180601125321.30652-1-osalvador@techadventures.net> User-Agent: Mutt/1.9.5 (2018-04-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [Cc Reza Arbab - I remember he was able to hit some bugs in memblock registration code when I was reworking that area previously] On Fri 01-06-18 14:53:17, osalvador@techadventures.net wrote: > From: Oscar Salvador > > > Hi, > > I wanted to give it a try and do a small cleanup in the memhotplug's code. > A lot more could be done, but I wanted to start somewhere. > I tried to unify/remove duplicated code. > > The following is what this patchset does: > > 1) add_memory_resource() has code to allocate a node in case it was offline. > Since try_online_node has some code for that as well, I just made add_memory_resource() to > use that so we can remove duplicated code.. > This is better explained in patch 1/4. > > 2) register_mem_sect_under_node() will be called only from link_mem_sections() > > 3) Get rid of link_mem_sections() in favour of walk_memory_range() with a callback to > register_mem_sect_under_node() > > 4) Drop unnecessary checks from register_mem_sect_under_node() > > > I have done some tests and I could not see anything broken because of > this patchset. > > Oscar Salvador (4): > mm/memory_hotplug: Make add_memory_resource use __try_online_node > mm/memory_hotplug: Call register_mem_sect_under_node > mm/memory_hotplug: Get rid of link_mem_sections > mm/memory_hotplug: Drop unnecessary checks from > register_mem_sect_under_node > > drivers/base/memory.c | 2 - > drivers/base/node.c | 52 +++++--------------------- > include/linux/node.h | 21 +++++------ > mm/memory_hotplug.c | 101 ++++++++++++++++++++++++++------------------------ > 4 files changed, 71 insertions(+), 105 deletions(-) > > -- > 2.13.6 > -- Michal Hocko SUSE Labs