Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp883721imm; Wed, 15 Aug 2018 07:48:57 -0700 (PDT) X-Received: by 2002:a62:234d:: with SMTP id j74-v6mr28121078pfj.106.1534344297477; Wed, 15 Aug 2018 07:44:57 -0700 (PDT) X-Google-Smtp-Source: AA+uWPypBVM36+BJEXFERLhIAMQ4Xc8bSRAUM3j4bIYnONuX1SkoQ6m/1RShn6y1VpA5aI3t/SrW X-Received: by 2002:a62:234d:: with SMTP id j74-v6mr28121037pfj.106.1534344296907; Wed, 15 Aug 2018 07:44:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534344296; cv=none; d=google.com; s=arc-20160816; b=UgXSbcRnl9G0aL/Ge5A7nIRIstsM377SPccc50VKTT3whA6J4B8JQdFoE8GsU8+ty3 yBCCTrtTAAuJVgqE24CcAEtXZkfFL53Geq3FPUaSdbypjbJN737kCwL07p1t8tdF2V7t zPtcerE+mfIeC4SSyEy88y4d2QIlab2TnDvuuw8Rn7OHXig0AqnekFlxwYXgtmiBNT/8 XCutWfFGSxbAjvovBT+Sj+PiK5S5UMS7zRs/eNJOX0NjP7xjniTl9ylN8627XI3J9RIR B8UgqgerYCPpExjCjPMoRkhuKc3yUt3ANy2nPP1w3wKtvTc/JRkL40ebfzfkRJx0ao2W 4Sdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=HKTu6y7RFvN/c9bNONpAZT5RMhKAMFpnA8OBIKrulj4=; b=xgvVdapW+ox/AzAy2Wtqwx3e/D/apopznmOOHt9SwtCnby/HrH/mF0Zx4T5iPgC5S3 TSZAHTz/9KcsWDK8w/tmoOOMKxDLoRASi5annUHyYDOeDAGm9tvDXXHvO6gzlCHH4o97 Q2i6dhlOV/Cq7fNCeHq4GCIL7DRgqRxAb8qpoBi/dLfvjkpy/B+eDfPhjb0O4To9S/Y2 wEUIyiDidVwQgKXxTeeJKQhxwRC4Z2ygNn0E6d6rIRe814uiWDI65JVgyy9T+mCvH5Tk l998wdfFmK0+4Cag+26xty0PPGNlENsEjnTqHWhlQtXL2SW004//wl+5O8jOyp4w/39X z5jw== 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 t196-v6si21148087pgc.308.2018.08.15.07.44.41; Wed, 15 Aug 2018 07:44: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 S1729402AbeHORe4 (ORCPT + 99 others); Wed, 15 Aug 2018 13:34:56 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:47064 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729300AbeHORez (ORCPT ); Wed, 15 Aug 2018 13:34:55 -0400 Received: by mail-wr1-f67.google.com with SMTP id h14-v6so1331175wrw.13 for ; Wed, 15 Aug 2018 07:42:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=HKTu6y7RFvN/c9bNONpAZT5RMhKAMFpnA8OBIKrulj4=; b=XvDXDrlJajZDyKgGCTjhnXatCVuKoA62YqVwpwZtLyJ/DNMe+DhhND8IkeSsNvMOFr iB1ggn+/Gin/oJXP5K2zaO4xrh4wRFpEcHzI4FVsjI2AdtDxgd2aNhD+K4C20eUgCDjt 6mpYFvjYT4+1ivCwJfRkbyciaz3jmxWScWTYw20V5EQwP8yvxlseSZG5OSGTXtRVufsl xQKkf4YwP/n+SfYN/WT5P71El2BrxB+YMNDSXy0KYxmG+dJLXXLZl9OMQqv679rtn/jv W1oyRDisSgW45tKpqY7QwCDDLnOuWMJ6thZeG1p0GmUyqFoGIzdQhKExUbjf4BrnAWyU nP8Q== X-Gm-Message-State: AOUpUlHKh+BG/sQ6JnJUqkVXs7NfUvyA1ReYShrpFS9HKzs3TYpK5BTs RFida8vq4NkV9B2aI4eJSgU= X-Received: by 2002:adf:97cf:: with SMTP id t15-v6mr16509928wrb.283.1534344149128; Wed, 15 Aug 2018 07:42:29 -0700 (PDT) Received: from techadventures.net (techadventures.net. [62.201.165.239]) by smtp.gmail.com with ESMTPSA id p11-v6sm16189775wrs.51.2018.08.15.07.42.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 Aug 2018 07:42:28 -0700 (PDT) Received: from d104.suse.de (charybdis-ext.suse.de [195.135.221.2]) by techadventures.net (Postfix) with ESMTPA id AAFB312489C; Wed, 15 Aug 2018 16:42:27 +0200 (CEST) From: Oscar Salvador To: akpm@linux-foundation.org Cc: mhocko@suse.com, vbabka@suse.cz, dan.j.williams@intel.com, yasu.isimatu@gmail.com, jonathan.cameron@huawei.com, david@redhat.com, Pavel.Tatashin@microsoft.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Oscar Salvador Subject: [PATCH v3 0/4] Refactoring for remove_memory_section/unregister_mem_sect_under_nodes Date: Wed, 15 Aug 2018 16:42:15 +0200 Message-Id: <20180815144219.6014-1-osalvador@techadventures.net> X-Mailer: git-send-email 2.13.6 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Oscar Salvador v2 -> v3: - NODEMASK_FREE can deal with NULL pointers, so do not make it conditional (by David). - Split up node_online's check patch (David's suggestion) - Added Reviewed-by from Andrew and David - Fix checkpath.pl warnings This patchset does some cleanups and refactoring in the memory-hotplug code. The first and the second patch are pretty straightforward, as they only remove unused arguments/checks. The third one refactors unregister_mem_sect_under_nodes. This is needed to have a proper fallback in case we could not allocate memory. (details can be seen in patch3). The fourth patch removes a node_online check. We are getting the nid from pages that are yet not removed, but a node can only be offline when its memory/cpu's have been removed. Therefore, we do not really need to check for the node to be online here. Since this change has a patch for itself, we could quickly revert it if we notice that something is wrong with it, or drop it if people are concerned about it. Oscar Salvador (4): mm/memory-hotplug: Drop unused args from remove_memory_section mm/memory_hotplug: Drop mem_blk check from unregister_mem_sect_under_nodes mm/memory_hotplug: Refactor unregister_mem_sect_under_nodes mm/memory_hotplug: Drop node_online check in unregister_mem_sect_under_nodes drivers/base/memory.c | 5 ++--- drivers/base/node.c | 29 +++++++++++++++-------------- include/linux/node.h | 5 ++--- 3 files changed, 19 insertions(+), 20 deletions(-) -- 2.13.6