From patchwork Wed Aug 15 14:42:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oscar Salvador X-Patchwork-Id: 10566669 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 727BC1510 for ; Wed, 15 Aug 2018 14:42:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 616502A902 for ; Wed, 15 Aug 2018 14:42:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 557C92A905; Wed, 15 Aug 2018 14:42:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E36952A902 for ; Wed, 15 Aug 2018 14:42:34 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 384D46B000A; Wed, 15 Aug 2018 10:42:32 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 29B276B000D; Wed, 15 Aug 2018 10:42:32 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F152B6B000C; Wed, 15 Aug 2018 10:42:31 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by kanga.kvack.org (Postfix) with ESMTP id 9A1656B0008 for ; Wed, 15 Aug 2018 10:42:31 -0400 (EDT) Received: by mail-wr1-f71.google.com with SMTP id t10-v6so1009583wrs.17 for ; Wed, 15 Aug 2018 07:42:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to:cc :subject:date:message-id:in-reply-to:references; bh=BdZLNw52aqmLAxMqJGxlH9ECMAhyOUNtYTzW93zUZJ4=; b=CD9aTpf2qBAZIUa2bvnIAoX73/X/HyQhy3o5YIpUJO8iuLcja1rvyB6K1oxTBZPghw 958pgQqvFBmhkU8M/RCVITa3HdcXSd9/fqFkgtY73mN8LrndF/kPs4ZDBJTvdO3T8pjC i7Z5xWK+2LjUX3cGCg+D8t2jGb75OqYdFHttwZxaeLxakQRrVZyW+pl+1nuridLSwejQ kN8zqlG4TuHEEg1jMjkduIRV/g6llweYjmm+JNiWQRkfOiJkzjUZS2bC69nH5eyL4Glp j9Qpt/lp7hIYp8gn7XNLcZsDxL65R3Uv9vzSaZRH1o3itS1Gqtv0gmEuqqfd43n8aeac exYg== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of osalvador.vilardaga@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=osalvador.vilardaga@gmail.com X-Gm-Message-State: AOUpUlEZuETIahUa0BB+l5Cd5cUHzihuP8eSRfMgEbQFRXZS3Ipp9pRY 7wk91lOmCmH5JPkRscaNYvPVkFSaor9rMV6ZHR/0J0Bf6kT9ktiPl5YRe2Y3Z1KC4M3y/tlS09w zKchVIL5YaeGXU4AgTP97r+ajp21bJHydyJsfLu2gwp+fRpsUiQ9742I1nCXcV4/sA0BWBOPScw /TBG/E8kmSmp6NrojRXNJc6JiCyxNdIUjrVOqOR3ubnKbHawZnUn8jLBwCfgSDte/IxdtIgXJf3 pydqU0ZyKoQyd1mCbGRQA8tiMNck+g05W+sDu83XlCcWbGkFezvndLeZd8+gKl1k4kTIM2oq4B+ hYKHE15laZAxJavvnGO7TCsFappZrABtnieqpvDjgu5EJGze8+R2Kq7l9Bi8dKz8bY5okrqyDw= = X-Received: by 2002:a1c:3:: with SMTP id 3-v6mr12545920wma.99.1534344151157; Wed, 15 Aug 2018 07:42:31 -0700 (PDT) X-Received: by 2002:a1c:3:: with SMTP id 3-v6mr12545895wma.99.1534344150298; Wed, 15 Aug 2018 07:42:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534344150; cv=none; d=google.com; s=arc-20160816; b=VMkkjiiJtc1uoSU7b8EKJQwjQ7H/xUh1/U2gysdn+vOIK0lI7Deo1DNohhM0iUuWpY 3nthGgNTFvUsK5w5YA8beldmKsBDXsv+xMwr8Ex7ArXIXO+ybGKgJy7Rswkuk3BTlmis gbuA2b0qFLexA2KTM/hHrirCS+9A/gG5arlHHxHvuxmQPkicTwb7q4Yb/dikC3coGE2o gJEaAj0FHdBOD9paPL22du2cT1dyX37bLe95P/wQXDR02TAelKQ8vPSFYBxIv9kDepau q6OKMqNFm885+PeiSWR6c3weHHJq/ZE8bMJx4I/hKmjSW6qf6F58wbwCDr8y3dnIiXAM GsoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=BdZLNw52aqmLAxMqJGxlH9ECMAhyOUNtYTzW93zUZJ4=; b=XiWVznlUutH0Lgkh+iCcg5sxYNmg1UAEwg43/DSRx8cvGLGjk8dEKrRx5HX1W/q8Of EhJeJ7DnqmNP/1AqYrQW4ZEj0xPnP8JRJbdq6mBVAzlTio3pIJeuAwLel76VQwpTWFAo E3lN0jgal3QhoEB6+aLeXX13hk/vuNauXRyeB0oFje/uz+4uP/AozrbUoxcNWAGuQ1eJ gRyFHbSX33BPeMD0DkUQzeNvwo0APxP/YGWspvIBOJmZatzRSvRrNqqBn/kpsIPePfiO 2OEYT4XhC0ugcTHvCK1dTkptruYI33WR223vEw9sTbSWpr6yqibWzTiAnBXNegmGvF3O PINw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of osalvador.vilardaga@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=osalvador.vilardaga@gmail.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id m193-v6sor440117wma.79.2018.08.15.07.42.30 for (Google Transport Security); Wed, 15 Aug 2018 07:42:30 -0700 (PDT) Received-SPF: pass (google.com: domain of osalvador.vilardaga@gmail.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; spf=pass (google.com: domain of osalvador.vilardaga@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=osalvador.vilardaga@gmail.com X-Google-Smtp-Source: AA+uWPx9ixWGPbeEHyin7m7JcOEBDGAlima7k0RWmR3Rh+WlJhrZpRgeGVDdayuKkTnw1auJGx6RFQ== X-Received: by 2002:a1c:b609:: with SMTP id g9-v6mr12788596wmf.73.1534344150025; Wed, 15 Aug 2018 07:42:30 -0700 (PDT) Received: from techadventures.net (techadventures.net. [62.201.165.239]) by smtp.gmail.com with ESMTPSA id h7-v6sm22889162wrs.8.2018.08.15.07.42.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 Aug 2018 07:42:29 -0700 (PDT) Received: from d104.suse.de (charybdis-ext.suse.de [195.135.221.2]) by techadventures.net (Postfix) with ESMTPA id E90C112489E; 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 1/4] mm/memory-hotplug: Drop unused args from remove_memory_section Date: Wed, 15 Aug 2018 16:42:16 +0200 Message-Id: <20180815144219.6014-2-osalvador@techadventures.net> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20180815144219.6014-1-osalvador@techadventures.net> References: <20180815144219.6014-1-osalvador@techadventures.net> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP From: Oscar Salvador unregister_memory_section() calls remove_memory_section() with three arguments: * node_id * section * phys_device Neither node_id nor phys_device are used. Let us drop them from the function. Signed-off-by: Oscar Salvador Reviewed-by: David Hildenbrand Reviewed-by: Andrew Morton Reviewed-by: Pavel Tatashin --- drivers/base/memory.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/base/memory.c b/drivers/base/memory.c index c8a1cb0b6136..2c622a9a7490 100644 --- a/drivers/base/memory.c +++ b/drivers/base/memory.c @@ -752,8 +752,7 @@ unregister_memory(struct memory_block *memory) device_unregister(&memory->dev); } -static int remove_memory_section(unsigned long node_id, - struct mem_section *section, int phys_device) +static int remove_memory_section(struct mem_section *section) { struct memory_block *mem; @@ -785,7 +784,7 @@ int unregister_memory_section(struct mem_section *section) if (!present_section(section)) return -EINVAL; - return remove_memory_section(0, section, 0); + return remove_memory_section(section); } #endif /* CONFIG_MEMORY_HOTREMOVE */ From patchwork Wed Aug 15 14:42:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oscar Salvador X-Patchwork-Id: 10566671 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1543C1510 for ; Wed, 15 Aug 2018 14:42:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 044D82A902 for ; Wed, 15 Aug 2018 14:42:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ED0AF2A905; Wed, 15 Aug 2018 14:42:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 889202A902 for ; Wed, 15 Aug 2018 14:42:37 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 83D9F6B0008; Wed, 15 Aug 2018 10:42:32 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 7EF646B000C; Wed, 15 Aug 2018 10:42:32 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5F0D66B000D; Wed, 15 Aug 2018 10:42:32 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-wm0-f71.google.com (mail-wm0-f71.google.com [74.125.82.71]) by kanga.kvack.org (Postfix) with ESMTP id 00AD36B0008 for ; Wed, 15 Aug 2018 10:42:31 -0400 (EDT) Received: by mail-wm0-f71.google.com with SMTP id z11-v6so894897wma.4 for ; Wed, 15 Aug 2018 07:42:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to:cc :subject:date:message-id:in-reply-to:references; bh=2QBHJLSndIlhEv9WAsiGy4U1CE6bNUzFCt/babHudhM=; b=ojTUsF3JCNsiyEuvFGrEuWQ4WqfzUgiwWIda/OPLLw6lXmb65f4ZZl45XwX4H1tTRY hywUouBUnrd5xWMj6zwI+bPy8+Vm7gWbOXGnJ1v4uZq0KprIjqZxPJ6aYGsH+YU7aAum nKe0x4iXEPgz33GceZJy4eXVgp+Mj2nOBzG+51TnAIxdxDJTgDR72jWqk+ouqi4U23ED Qr/pg9EXw/H/7TMl03RMSOGDhW3NAX23HKk4pK4XO66m2WEUJGe3Kzl0WfM4pBEsPcug 9EgNHVAdBBFFHvf4dkhXvDnKmlwrnIBDHC4EKdLnWW1j7mNTJmCFkcZFeN5wLEsww0k5 5apw== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of osalvador.vilardaga@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=osalvador.vilardaga@gmail.com X-Gm-Message-State: AOUpUlF4373sPN73zjKKG4aAQODiGONYehqYzC1WjoXTvSsFUN+VCUzr gIQORNxoPm34ksm0vCGieaCZMUHm4/KjnGOZeI6KjgKbhohTk/sNLOJGqSnGbhWhZZd6nOJKxTH S/JmQ3gRN10E4IvjkY8aXi5m4IqM3DHH7yDgH6b1+sAoET5d3XDmmnXFXbgjSxyTWCmqXqzvXvf SENr8jBHNKZbmg5B3YRR4a9/Tk75rDi4XmiN06P/Xr083PdGFSh29LEmuA+Svn8GiqGTstpOo4N 0YIUYFZLsz8F9niUg36JCmRf9Ejm8pnf7w5IcuFhxWfmOIttoglM1G/c/oh0TkZD0jku4YiqRgN B8hGEMQYLz55b149Imnr0WwxAcDw/x96B88uCP0OxbLjzJfvfX7p7gJYaViorpR+1dSc0x6C4Q= = X-Received: by 2002:a1c:8682:: with SMTP id i124-v6mr14382326wmd.77.1534344151442; Wed, 15 Aug 2018 07:42:31 -0700 (PDT) X-Received: by 2002:a1c:8682:: with SMTP id i124-v6mr14382309wmd.77.1534344150746; Wed, 15 Aug 2018 07:42:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534344150; cv=none; d=google.com; s=arc-20160816; b=iZ79J/6kp7APX5COS+GueD6HUd6JSAm+eIWELxM+9NJ5ld8DrP2aIU+knR95WQA6Id K9tMpaWGmjXWfDOh43qZBuz2/Zy8LwMgo2SXnHWjp/yh4TbVlLEL7wsi3TuRPr91EiZe tr8xrwJQbKGXqyC618R/rE6JEwIuDHIhCt0zvqrZRcf8oCluZ7EQ2CLaxsLingckfGaE 6vZYZFebOvWfbiOtGuMZmRv8RbRsv9+GbKM7im6UjDtw94Qkl6FuzkbK4MuK8WTnSJFr kBeR1E78nW0dtYK7E6A7AQ7B560TWCKPjdVIeDNtRaK6NsoNahLeMTE09/6GA+X+fTwe W5Dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=2QBHJLSndIlhEv9WAsiGy4U1CE6bNUzFCt/babHudhM=; b=sB/N+FokqHJ5oOYw6W043Mdar/6Y1X4v/5/3oMjCOs+dojJ9y/kMyUKOC2Y5hB6HBT WWBkZ+4TWoDpdp/+MOIhfUdBmh5ubHJfhUmkBTy/PcoOttBN9lDyS42mpGfnBaXVdKP5 55y32svprazuZFG1S46jzBZnCoG8zWFHH+/51cHF3722ZJviFcfiiEnZFvGkJlj/c3Zn le2qRPZEBt4FXj1X6GeAHWAF/NJRaJqr4Ktn2hNhRF6V3t7VoiNgi264wxgcZ0Vrv2yQ QM4YQ3KQeKQw9mSdJvLj8XdLLl9GR+fYQvqDJRoNlsYELasWWR1rIDnuPshCzmEaVJKD YNTg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of osalvador.vilardaga@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=osalvador.vilardaga@gmail.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id w13-v6sor8565403wrl.31.2018.08.15.07.42.30 for (Google Transport Security); Wed, 15 Aug 2018 07:42:30 -0700 (PDT) Received-SPF: pass (google.com: domain of osalvador.vilardaga@gmail.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; spf=pass (google.com: domain of osalvador.vilardaga@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=osalvador.vilardaga@gmail.com X-Google-Smtp-Source: AA+uWPzKqdMDlGqLXohO8LNpswrEfFSAkzyS00GXdQhNfSXRbvPIrkJ8BThDgUGJctV2PO/j00kwEQ== X-Received: by 2002:adf:8004:: with SMTP id 4-v6mr17031601wrk.130.1534344150509; Wed, 15 Aug 2018 07:42:30 -0700 (PDT) Received: from techadventures.net (techadventures.net. [62.201.165.239]) by smtp.gmail.com with ESMTPSA id v14-v6sm1271377wmh.41.2018.08.15.07.42.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 Aug 2018 07:42:29 -0700 (PDT) Received: from d104.suse.de (charybdis-ext.suse.de [195.135.221.2]) by techadventures.net (Postfix) with ESMTPA id 37B1012489F; Wed, 15 Aug 2018 16:42:28 +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 2/4] mm/memory_hotplug: Drop mem_blk check from unregister_mem_sect_under_nodes Date: Wed, 15 Aug 2018 16:42:17 +0200 Message-Id: <20180815144219.6014-3-osalvador@techadventures.net> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20180815144219.6014-1-osalvador@techadventures.net> References: <20180815144219.6014-1-osalvador@techadventures.net> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP From: Oscar Salvador Before calling to unregister_mem_sect_under_nodes(), remove_memory_section() already checks if we got a valid memory_block. No need to check that again in unregister_mem_sect_under_nodes(). If more functions start using unregister_mem_sect_under_nodes() in the future, we can always place a WARN_ON to catch null mem_blk's so we can safely back off. For now, let us keep the check in remove_memory_section() since it is the only function that uses it. Signed-off-by: Oscar Salvador Reviewed-by: Andrew Morton Reviewed-by: Pavel Tatashin Reviewed-by: David Hildenbrand --- drivers/base/node.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/base/node.c b/drivers/base/node.c index 1ac4c36e13bb..dd3bdab230b2 100644 --- a/drivers/base/node.c +++ b/drivers/base/node.c @@ -455,10 +455,6 @@ int unregister_mem_sect_under_nodes(struct memory_block *mem_blk, NODEMASK_ALLOC(nodemask_t, unlinked_nodes, GFP_KERNEL); unsigned long pfn, sect_start_pfn, sect_end_pfn; - if (!mem_blk) { - NODEMASK_FREE(unlinked_nodes); - return -EFAULT; - } if (!unlinked_nodes) return -ENOMEM; nodes_clear(*unlinked_nodes); From patchwork Wed Aug 15 14:42:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oscar Salvador X-Patchwork-Id: 10566673 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8D65415E2 for ; Wed, 15 Aug 2018 14:42:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7B4C42A902 for ; Wed, 15 Aug 2018 14:42:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6FB9F2A905; Wed, 15 Aug 2018 14:42:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D9AB72A902 for ; Wed, 15 Aug 2018 14:42:39 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 33A086B000C; Wed, 15 Aug 2018 10:42:33 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 26C456B000D; Wed, 15 Aug 2018 10:42:33 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 10E896B000E; Wed, 15 Aug 2018 10:42:33 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by kanga.kvack.org (Postfix) with ESMTP id 9E8746B000D for ; Wed, 15 Aug 2018 10:42:32 -0400 (EDT) Received: by mail-wr1-f69.google.com with SMTP id z16-v6so1000653wrs.22 for ; Wed, 15 Aug 2018 07:42:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to:cc :subject:date:message-id:in-reply-to:references; bh=I2UQDafRhlwWSGUrQN/8rcLHamOMjqaMdDg6JvlZSrA=; b=VWCQC4hyva/5LpAzwLH7DSgdDwek41A806qegrKar3Txv7uWohSbOCl+T6mvKNEzYA 6as8+e03tsl8BmctnqpkNHx/oeVJw14zL12gwgDmihWvKY3JepPR9O5wS172JnzUoAJY QQq5fvlCj6C+gzTkfopibUD8LNJKrSqdE70pIcSfmkEUumuQn1QPB+QqxxbgBCFCajGV EVbe6EvmXVEma55OUsllsP04KqgV0AJwGFRNrIKCx69Qg0mBXts25RlGSTTW42SpA68J NPMAwP/W4q9R8rYiLAmVwlZCTIZPVo/RPhnXbLxZc3kbZV2+tFB4spXumMYFEjIxR5tU i9fA== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of osalvador.vilardaga@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=osalvador.vilardaga@gmail.com X-Gm-Message-State: AOUpUlHfBFsG2sI67hwUL91Z63xtaYNRrIRVzp4gEStsBpy6yKfSurW1 0J2FVfxGPCMF+9D5IcgWQG0hZx2BO/t6LgZP08XpoAesfaLYII2QR1Hq5PkR4rVHpERnwztpGEn CGiQLTfCWHUcKw2ygQGgX0vxLw7MtFCWPRvNX5w4NJw1A8IV7ysIcy5EbBSHlKfS8O9cgiRtf0F DRn9iRGXPv8v+/NOFDDNmzRsmEku3KztvVoSwGs5LSmErx5yLIgyDh8NCe8xDlpMYBMdz3QKFoB VNDpB8RlhgvLmy/ma/RDWc8t/a172uMYk9vosaFod7jrO7/nwnR9OR9fx3XzGtvm1dY20MXMBeq zD9zzgqdYV5s9XiUD3RBP2+csbxyIJAV80qIQzsPupbtcOU8ak61+F+/0cfRfFXjZn39igxOaw= = X-Received: by 2002:a5d:4c4c:: with SMTP id n12-v6mr17032707wrt.71.1534344152169; Wed, 15 Aug 2018 07:42:32 -0700 (PDT) X-Received: by 2002:a5d:4c4c:: with SMTP id n12-v6mr17032663wrt.71.1534344151296; Wed, 15 Aug 2018 07:42:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534344151; cv=none; d=google.com; s=arc-20160816; b=MwTiIbaQ6O4J+p9eEfOtHmhUfUhT6ZFVNpAlrsWPBVp57BAA5xnS4o9zcSEeV6FTV5 80UAp6FF5ijMruph57K4T3RMkp7DbBRbzIMJSejeYZjXHaIAp2bQO/934ghxRtsCCcU/ 3QFoxxMB7fLbxYcwLV2lksO8DWqWG8v2aqje+ejpgiRINspE/5UxWV2B1wEPMKbmGkto 7X3bFEXyS228BdF7oqOj1ltgg1R57QbI3pFu7h72AVZIwFzFzyRy/A1ZIqNcJbQTLBZI 2NLmsEXjLMsFmlZX0DhTUO8PePZshmJdeG823p6sxSJ8m+Jzm+x0EgBzPW37a2T4a55z B0dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=I2UQDafRhlwWSGUrQN/8rcLHamOMjqaMdDg6JvlZSrA=; b=F5leszZfIX64/UMMMoxi2RKP1p6dE9xf2UMiHBDgzJVulaSrCvTESMDx8XwjMQfokt g10YR8BAAcbZLcYpsCqfX9W9W0wl4GkW9IkIhGCeccCcREU2MdyYw7pMt0h3mQ/0tPY7 H6k5gAPS2aRGey2huS89yt35iwxr+Ky3GZq11eHlKGoQ+HHBo6tGB+jm0/LUMGMl1VV3 D0mbB9XGEvvrXmF/XW5vKgFe/TCBkzUEFpjc1uSPtPgfrHJf8BBw8isL9fbagHeB6EyA 9TOoDsydn/8cpXlqdx5qcx04EK/Zqsax350EIDbAWmzR6uoNyX4XzUYpVyTjDbif23tN j9jQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of osalvador.vilardaga@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=osalvador.vilardaga@gmail.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id 64-v6sor483504wmb.42.2018.08.15.07.42.31 for (Google Transport Security); Wed, 15 Aug 2018 07:42:31 -0700 (PDT) Received-SPF: pass (google.com: domain of osalvador.vilardaga@gmail.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; spf=pass (google.com: domain of osalvador.vilardaga@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=osalvador.vilardaga@gmail.com X-Google-Smtp-Source: AA+uWPx/kdcTnwJNZ7FDSoD2iP1vX9rmS1W+o1C2niNfRK8QGiwxfKx89NWS11r1ua3TiOOwbTY7nA== X-Received: by 2002:a1c:b84e:: with SMTP id i75-v6mr12853566wmf.158.1534344150952; Wed, 15 Aug 2018 07:42:30 -0700 (PDT) Received: from techadventures.net (techadventures.net. [62.201.165.239]) by smtp.gmail.com with ESMTPSA id d123-v6sm3189039wmd.9.2018.08.15.07.42.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 Aug 2018 07:42:29 -0700 (PDT) Received: from d104.suse.de (charybdis-ext.suse.de [195.135.221.2]) by techadventures.net (Postfix) with ESMTPA id 7C6CF1248A0; Wed, 15 Aug 2018 16:42:28 +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 3/4] mm/memory_hotplug: Refactor unregister_mem_sect_under_nodes Date: Wed, 15 Aug 2018 16:42:18 +0200 Message-Id: <20180815144219.6014-4-osalvador@techadventures.net> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20180815144219.6014-1-osalvador@techadventures.net> References: <20180815144219.6014-1-osalvador@techadventures.net> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP From: Oscar Salvador unregister_mem_sect_under_nodes() tries to allocate a nodemask_t in order to check whithin the loop which nodes have already been unlinked, so we do not repeat the operation on them. NODEMASK_ALLOC calls kmalloc() if NODES_SHIFT > 8, otherwise it just declares a nodemask_t variable whithin the stack. Since kamlloc() can fail, we actually check whether NODEMASK_ALLOC failed or not, and we return -ENOMEM accordingly. remove_memory_section() does not check for the return value though. The problem with this is that if we return -ENOMEM, it means that unregister_mem_sect_under_nodes will not be able to remove the symlinks, but since we do not check the return value, we go ahead and we call unregister_memory(), which will remove all the mem_blks directories. This will leave us with dangled symlinks. The easiest way to overcome this is to fallback by calling sysfs_remove_link() unconditionally in case NODEMASK_ALLOC failed. This means that we will call sysfs_remove_link on nodes that have been already unlinked, but nothing wrong happens as sysfs_remove_link() backs off somewhere down the chain in case the link has already been removed. I think that this is better than a) dangled symlinks b) having to recovery from such error in remove_memory_section Since from now on we will not need to care about return values, we can make the function void. As we have a safe fallback, one thing that could also be done is to add __GFP_NORETRY in the flags when calling NODEMASK_ALLOC, so we do not retry. Signed-off-by: Oscar Salvador --- drivers/base/node.c | 23 +++++++++++++++-------- include/linux/node.h | 5 ++--- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/drivers/base/node.c b/drivers/base/node.c index dd3bdab230b2..81b27b5b1f15 100644 --- a/drivers/base/node.c +++ b/drivers/base/node.c @@ -449,35 +449,42 @@ int register_mem_sect_under_node(struct memory_block *mem_blk, void *arg) } /* unregister memory section under all nodes that it spans */ -int unregister_mem_sect_under_nodes(struct memory_block *mem_blk, +void unregister_mem_sect_under_nodes(struct memory_block *mem_blk, unsigned long phys_index) { NODEMASK_ALLOC(nodemask_t, unlinked_nodes, GFP_KERNEL); unsigned long pfn, sect_start_pfn, sect_end_pfn; - if (!unlinked_nodes) - return -ENOMEM; - nodes_clear(*unlinked_nodes); + if (unlinked_nodes) + nodes_clear(*unlinked_nodes); sect_start_pfn = section_nr_to_pfn(phys_index); sect_end_pfn = sect_start_pfn + PAGES_PER_SECTION - 1; for (pfn = sect_start_pfn; pfn <= sect_end_pfn; pfn++) { - int nid; + int nid = get_nid_for_pfn(pfn); - nid = get_nid_for_pfn(pfn); if (nid < 0) continue; if (!node_online(nid)) continue; - if (node_test_and_set(nid, *unlinked_nodes)) + /* + * It is possible that NODEMASK_ALLOC fails due to memory + * pressure. + * If that happens, we fallback to call sysfs_remove_link + * unconditionally. + * Nothing wrong will happen as sysfs_remove_link will back off + * somewhere down the chain in case the link has already been + * removed. + */ + if (unlinked_nodes && node_test_and_set(nid, *unlinked_nodes)) continue; + sysfs_remove_link(&node_devices[nid]->dev.kobj, kobject_name(&mem_blk->dev.kobj)); sysfs_remove_link(&mem_blk->dev.kobj, kobject_name(&node_devices[nid]->dev.kobj)); } NODEMASK_FREE(unlinked_nodes); - return 0; } int link_mem_sections(int nid, unsigned long start_pfn, unsigned long end_pfn) diff --git a/include/linux/node.h b/include/linux/node.h index 257bb3d6d014..1203378e596a 100644 --- a/include/linux/node.h +++ b/include/linux/node.h @@ -72,7 +72,7 @@ extern int register_cpu_under_node(unsigned int cpu, unsigned int nid); extern int unregister_cpu_under_node(unsigned int cpu, unsigned int nid); extern int register_mem_sect_under_node(struct memory_block *mem_blk, void *arg); -extern int unregister_mem_sect_under_nodes(struct memory_block *mem_blk, +extern void unregister_mem_sect_under_nodes(struct memory_block *mem_blk, unsigned long phys_index); #ifdef CONFIG_HUGETLBFS @@ -105,10 +105,9 @@ static inline int register_mem_sect_under_node(struct memory_block *mem_blk, { return 0; } -static inline int unregister_mem_sect_under_nodes(struct memory_block *mem_blk, +static inline void unregister_mem_sect_under_nodes(struct memory_block *mem_blk, unsigned long phys_index) { - return 0; } static inline void register_hugetlbfs_with_node(node_registration_func_t reg, From patchwork Wed Aug 15 14:42:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oscar Salvador X-Patchwork-Id: 10566675 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E630515E2 for ; Wed, 15 Aug 2018 14:42:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D6DB82A902 for ; Wed, 15 Aug 2018 14:42:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CAE362A905; Wed, 15 Aug 2018 14:42:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 77F012A902 for ; Wed, 15 Aug 2018 14:42:42 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3CE8B6B000E; Wed, 15 Aug 2018 10:42:34 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 35C636B0010; Wed, 15 Aug 2018 10:42:34 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 184D76B0266; Wed, 15 Aug 2018 10:42:34 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by kanga.kvack.org (Postfix) with ESMTP id B1EAB6B000E for ; Wed, 15 Aug 2018 10:42:33 -0400 (EDT) Received: by mail-wr1-f69.google.com with SMTP id p12-v6so1018918wro.7 for ; Wed, 15 Aug 2018 07:42:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to:cc :subject:date:message-id:in-reply-to:references; bh=d5t4JM6u128OdWFKaN6Pi+4z+3cMbUK86+f7qJ/R6T8=; b=sMN0iBsem5D8RTB5oet3QCNDQ1i3DPD9h2uHNb7eYNmY7viburSW/938fSeWUTkxJZ 0pUABLCGW6SEAsHPv7BagNbMWnmSWkdgCtPfJRf2K9JCqO5ul/Vs1+79wqFAzIf+y+YW c08PrUG4nlvaVbUCumo3uCXoRp00xx80Y2RheRq00vJjcWzSWlHyYwZ07G5MXL2Xs4zf jp6ub796lSEX7N/3J09v+ZFAaefck12IRZNpm5MmU04rSOjD9oFpSNMTY+5kWAmXMd92 o+9RpZaiysXndBHftqgwmwiiP557dKQW4kGfTlrezcHgbRJuZJi8oHk/AVETjvsuG6IU Jang== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of osalvador.vilardaga@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=osalvador.vilardaga@gmail.com X-Gm-Message-State: AOUpUlGfGRx82nTxN8djVH70N0io8gZyL2Bp1WBwUez1iSncDosBg16J fCPosjvS/JzMXGgyDtzfzHBHJZPvs1O0koV9ql2pxz85pdKtrxtWvwEJaii8l1gu69kqsGZXvST MNcPLHO9NSqAAjrRQKH55TSwQVFld+bKf8udyiZaIevXV1Mf0HDjbx5ykcqqYzt/Gu8lf8eyGUV o6GA1Pfgp9f8YwHVOXDGYuif9ZPo0xhFL8y9DNUtvXeECBZ1EqkcbyD/VGS+h9YPg52VZi6TNxV zk5KcOHPtRLNgcwUHFvGMNo3LwoGoTHFW0Zrf/w2oXkNTT99Rox/4x5IqiXiCTX0Y3RejMJXbwt JGQ+kBZ+s4/oIaOHi9mVbx24CWbkkgvrpfENfI2HTXNChqkC2Z9Q1MdrEWqrghs0qJ3GZwuUfQ= = X-Received: by 2002:adf:e584:: with SMTP id l4-v6mr16263346wrm.190.1534344153274; Wed, 15 Aug 2018 07:42:33 -0700 (PDT) X-Received: by 2002:adf:e584:: with SMTP id l4-v6mr16263319wrm.190.1534344152351; Wed, 15 Aug 2018 07:42:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534344152; cv=none; d=google.com; s=arc-20160816; b=dO3digLx1aSpL+FyKFJlltIbTedym22ssTKLPXCQ+LPyCbZcId30qmEKasdX69gUAn KYJF601aFtRglAsZ2qoy6OFXqzqzOKnAsAU+sJIuo4jRA7oLOkan6hFAM8k2vZyb+HhB 8HHKEJ/ehLQhWhReMC5w8eGFMSMcTjk9WXr8CYvCKvqH/UbrhfLpJ65Of4/6jipru9LI MRJsoGHaCC7kHZ/bJqj/zhoBMYvqx4u6YU3OZz4I7wqrrt+DQcLSs45woj9zhsIQqyou L/B49qxsQvQZdJrWub+euYpxiQvVpIcC0wNRJdU5AyoWkFheh6ijqMaLgOn+pXDS67M/ mEgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=d5t4JM6u128OdWFKaN6Pi+4z+3cMbUK86+f7qJ/R6T8=; b=wLq9cpql0qeS5QCa0nJeT+aZY2jfVpR77W1tJ67OYNt2BHvsefPF7TKuoO8RpVXt1o LOKa59OPjL/DvAkPcsMrtH7wDq6vyISkhFZE8YRNICczHdMCPET9KLty+fRSQ5LUpN1L wOJqfoT2aA98HYAEIpgy4UxZvDlF/YqXMIQXbzQQ+Citxzx/tCSYG6Y2pkjqMJeUHpCG zz8hWjaoH8xMDmrweUcOaXhVaxhfC+kz4gnfKRrNPgcJhZGCd0b6dsw/hq03ZmeAKf20 eEUamKgJaRmkHhJ4zc6hyNQr9bsJ4umXjC2mLfaoeSPEtJIOUmiyIcL3T8KPWmAy+qUi YU1Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of osalvador.vilardaga@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=osalvador.vilardaga@gmail.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id h6-v6sor8279655wre.67.2018.08.15.07.42.32 for (Google Transport Security); Wed, 15 Aug 2018 07:42:32 -0700 (PDT) Received-SPF: pass (google.com: domain of osalvador.vilardaga@gmail.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; spf=pass (google.com: domain of osalvador.vilardaga@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=osalvador.vilardaga@gmail.com X-Google-Smtp-Source: AA+uWPxpvGb3Z418XXlCV4EC3wi3IkPkHLUaLUA/IaP6UV+yImGQFJzLH6lWRA0daJWjS0ZfeX05Zw== X-Received: by 2002:adf:e992:: with SMTP id h18-v6mr17038910wrm.238.1534344152122; Wed, 15 Aug 2018 07:42:32 -0700 (PDT) Received: from techadventures.net (techadventures.net. [62.201.165.239]) by smtp.gmail.com with ESMTPSA id n7-v6sm17137985wmc.2.2018.08.15.07.42.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 Aug 2018 07:42:30 -0700 (PDT) Received: from d104.suse.de (charybdis-ext.suse.de [195.135.221.2]) by techadventures.net (Postfix) with ESMTPA id B77E31248A1; Wed, 15 Aug 2018 16:42:28 +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 4/4] mm/memory_hotplug: Drop node_online check in unregister_mem_sect_under_nodes Date: Wed, 15 Aug 2018 16:42:19 +0200 Message-Id: <20180815144219.6014-5-osalvador@techadventures.net> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20180815144219.6014-1-osalvador@techadventures.net> References: <20180815144219.6014-1-osalvador@techadventures.net> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP From: Oscar Salvador We are getting the nid from the pages that are not yet removed, but a node can only be offline when its memory/cpu's have been removed. Therefore, we know that the node is still online. Signed-off-by: Oscar Salvador Reviewed-by: David Hildenbrand Reviewed-by: Pavel Tatashin --- drivers/base/node.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/base/node.c b/drivers/base/node.c index 81b27b5b1f15..b23769e4fcbb 100644 --- a/drivers/base/node.c +++ b/drivers/base/node.c @@ -465,8 +465,6 @@ void unregister_mem_sect_under_nodes(struct memory_block *mem_blk, if (nid < 0) continue; - if (!node_online(nid)) - continue; /* * It is possible that NODEMASK_ALLOC fails due to memory * pressure.