Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1993235imm; Thu, 7 Jun 2018 03:48:56 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKDvvUkW9qcGQ2rokTLL/LTdCSvgqG2Pc5ug72+v94U6K+P3OrqSRjRqcv6QrhZTjLrA2D/ X-Received: by 2002:a65:62d9:: with SMTP id m25-v6mr1111865pgv.371.1528368536624; Thu, 07 Jun 2018 03:48:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528368536; cv=none; d=google.com; s=arc-20160816; b=Ac3per4QHLr9Zg7KqfWIy4g0fMnDZB4WsEQrCFeV16x1fnC2nVeqv9KcsQRwKUpUxZ clFf/FORgKc8OH2xQJHDOwX3z4WShHwx3v+wcSooLYxrPTr6xXEwhnqPxpdpIQVpT2+y mOTaZA3NUmmsQwNTa6CQotEX7fJEX0vRsfnTAZb3+a5azDY66Y02MiHdSL7s8JddQfUk NUO4QtWQHEVKjPanPpZlyOHMXxo0AnfPOZFXLOgPQQmDgIDtTykY3JHeAtSwysEVU17n 6C2+tz8BO7kD2PJ4BrRLQnsCrOQSShL6vQt/kpm6TOILWR6V5cMt1zbuXZcapwrH9XL4 bvEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:arc-authentication-results; bh=01tGWtLwTYna/n1RB1PuKaKyTbCwS2aiMp4mDeB844Y=; b=s1hCOvVDJ9ulvqsCrKEnq9N8EcNIln/KC/rGTuJdynsmcLonbKNuweZRIWkNr6XMZ4 zs7NWaPvwbu7r4xWz+7MaQi3GJ6x+mE80zwZ4yH2E/LAc071bTLQ8ttaE1NAihSdXBv+ IzjvxyVw4LLh4OCS8AKcpJbdRFNzpIeiOv3EHo+kMtJPLuGZgKljHHt9io+e1n/i7rqI SFExPVP/iqmpTiIctlA5jGKbzkfwNWIZLE+Eu5eUFK4aTB4gBnKlBonTY93hS7T1sXFJ bg14c9yVL8d5whBJFadTPzHFQIit8QaOVpbzLD9Cyqvj2t5RcyN3h1hxgZAQioTAnS0l YUmQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z15-v6si15632282pll.490.2018.06.07.03.48.40; Thu, 07 Jun 2018 03:48:56 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932388AbeFGKnC (ORCPT + 99 others); Thu, 7 Jun 2018 06:43:02 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:46349 "EHLO huawei.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1752669AbeFGKnB (ORCPT ); Thu, 7 Jun 2018 06:43:01 -0400 Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id BEAA8763D251; Thu, 7 Jun 2018 18:42:57 +0800 (CST) Received: from localhost (10.206.48.115) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.382.0; Thu, 7 Jun 2018 18:42:55 +0800 Date: Thu, 7 Jun 2018 11:42:45 +0100 From: Jonathan Cameron To: , CC: , , , , , Oscar Salvador Subject: Re: [PATCH 0/4] Small cleanup for memoryhotplug Message-ID: <20180607114245.00001068@huawei.com> In-Reply-To: <20180601125321.30652-1-osalvador@techadventures.net> References: <20180601125321.30652-1-osalvador@techadventures.net> Organization: Huawei X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; i686-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.206.48.115] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 1 Jun 2018 14:53:17 +0200 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. Works fine with the patch set for arm64 I'm intermittently working on. Or at least I don't need to make any additional changes on top of what I currently have! Tested-by: Jonathan Cameron Thanks, Jonathan > > 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(-) >