Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2544386imm; Thu, 16 Aug 2018 11:12:37 -0700 (PDT) X-Google-Smtp-Source: AA+uWPxWHrKDL6iMFp3AICa9pX53zUFIlYK7YaTa+9W9V2CNkvj/p6tmAIyVIDasLMcpWmM8NUof X-Received: by 2002:a63:9902:: with SMTP id d2-v6mr29968573pge.343.1534443157693; Thu, 16 Aug 2018 11:12:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534443157; cv=none; d=google.com; s=arc-20160816; b=tvQ6mnLnjeAnwyT115GA8ZUEaVFUaJgiAvd1luDAUv8wHmUOer/4rDamm1KRzaYisQ yuzGLGRR6yn3smEixjy/170YD3UVZfi2SxHFpu3IrpedTyzkC3QvGnAhNCRpCwYXDsV2 wtM4Ar2KMfEjNI211QwWifbzObJhHesOzBGkG6mq4eovqosLI2aS19clVDzJQAZpKR6M T11GwWw0qU+o6jS1sJQylcbgLrdMPuBnkOynay7Ot0a4cgDInRyqd+Dd3rciSZqSFPs8 DI32ACIDvQ90GeFcdgjfatCduEQUwiAGFHnJKtQf+apf1n2GR5KJzPo3Qy/W4YQuC8i2 HXCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=58eppWzBrms+oicXZ8vv1kTgC2Dj9f4AShb64br5H2I=; b=O8d9TLkDSBEiYtWMElKjGCy4QTWld6cuq2AYaZz9DGqHylUF1yH85icmW8/AaWVBXf 9HDtSrIIlqdRXkRSkWg9c3C4btZiy90FVpvXelx42RLlRcrQowSV6NwgfJAMXXHHDGNa 8m5v2Qky61OZ4BF6mFGJJoQ38CbdY9Kz6khVi1yEpBxE1cZo9cM3RlALQcJLUV3ewgTB R2EVuCF7kVBIvI8F4QlSt2nNTO+kIpMsV3XlraOWN2E58nszYVoxKb7N6Ruub6+9n6n6 k1HXsiUwqqhLDcw71o2O1U0kvFHyOx5nnOsV/ivYkzmGZc+m+JA62INA0trLp/VCZepb k1Mg== 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f15-v6si22427709pli.194.2018.08.16.11.12.22; Thu, 16 Aug 2018 11:12:37 -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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390793AbeHPNET (ORCPT + 99 others); Thu, 16 Aug 2018 09:04:19 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:55842 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728018AbeHPNES (ORCPT ); Thu, 16 Aug 2018 09:04:18 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 88F7840122D7; Thu, 16 Aug 2018 10:06:49 +0000 (UTC) Received: from t460s.redhat.com (ovpn-116-94.ams2.redhat.com [10.36.116.94]) by smtp.corp.redhat.com (Postfix) with ESMTP id 87D1210FFE7E; Thu, 16 Aug 2018 10:06:46 +0000 (UTC) From: David Hildenbrand To: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, Andrew Morton , Michal Hocko , Vlastimil Babka , Stephen Rothwell , Pavel Tatashin , Kemi Wang , David Rientjes , Jia He , Oscar Salvador , Petr Tesarik , Andrey Ryabinin , Dan Williams , David Hildenbrand , Mathieu Malaterre , Baoquan He , Wei Yang , Ross Zwisler , "Kirill A . Shutemov" Subject: [PATCH v1 4/5] mm/memory_hotplug: onlining pages can only fail due to notifiers Date: Thu, 16 Aug 2018 12:06:27 +0200 Message-Id: <20180816100628.26428-5-david@redhat.com> In-Reply-To: <20180816100628.26428-1-david@redhat.com> References: <20180816100628.26428-1-david@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Thu, 16 Aug 2018 10:06:49 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Thu, 16 Aug 2018 10:06:49 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'david@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Onlining pages can only fail if a notifier reported a problem (e.g. -ENOMEM). online_pages_range() can never fail. Signed-off-by: David Hildenbrand --- mm/memory_hotplug.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index 3dc6d2a309c2..bbbd16f9d877 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -933,13 +933,8 @@ int __ref online_pages(unsigned long pfn, unsigned long nr_pages, int online_typ setup_zone_pageset(zone); } - ret = walk_system_ram_range(pfn, nr_pages, &onlined_pages, - online_pages_range); - if (ret) { - if (need_zonelists_rebuild) - zone_pcp_reset(zone); - goto failed_addition; - } + walk_system_ram_range(pfn, nr_pages, &onlined_pages, + online_pages_range); zone->present_pages += onlined_pages; -- 2.17.1