From patchwork Thu Aug 16 10:06:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Hildenbrand X-Patchwork-Id: 10567279 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 AD5715A4 for ; Thu, 16 Aug 2018 10:06:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9A9202856F for ; Thu, 16 Aug 2018 10:06:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8E0AC2A836; Thu, 16 Aug 2018 10:06:52 +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 33B482856F for ; Thu, 16 Aug 2018 10:06:52 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id F3C266B0269; Thu, 16 Aug 2018 06:06:50 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id EC3DD6B026A; Thu, 16 Aug 2018 06:06:50 -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 D63846B026B; Thu, 16 Aug 2018 06:06:50 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-qk0-f200.google.com (mail-qk0-f200.google.com [209.85.220.200]) by kanga.kvack.org (Postfix) with ESMTP id A3E926B0269 for ; Thu, 16 Aug 2018 06:06:50 -0400 (EDT) Received: by mail-qk0-f200.google.com with SMTP id a70-v6so3799283qkb.16 for ; Thu, 16 Aug 2018 03:06:50 -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=58eppWzBrms+oicXZ8vv1kTgC2Dj9f4AShb64br5H2I=; b=DkL5WlzaZC6ztbsVPDrVI2KOA/Wss2jvxYzpMGC0KJWfZg34MDM4Q75BaG+PkBhLl2 aqpeGgFKiccyvLLAWKHzDBpjtrQXO9Ji8v8gE1Oi6mpBRa1Q8OpFP+0CU/V8mXrQWmP9 vZwXKw0RhihuoHWS9F/dxRd2JnFxb+p8rDqOOxpw56TNWVSgwIdWCEMLQvWsBK03boOH tMIjUKnStbPk/0eScXVig0bs78g7tUmDFc49O7Fr1UVnAcaI+L8cP7IPtnisWTd3Zfsv TwlWsVYEMB0VFj2Bn7HGBf8OiXuwuczaQ6vPvwAGTT7u2yvLbHMlqfC0wV91/OUGmPPh eijw== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of david@redhat.com designates 66.187.233.73 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com X-Gm-Message-State: AOUpUlHqzwWGAJeYbN2RdGcSkikWIqurEpj+dvtewOiZzy8MHogpyWlb TpE/ck8a9KLnafhcHfpIlYRoNbKfkClY0zl/L01+zCII7O0YC04OdibDoyORSqjAd3c8WQ9roaN DE8yRpfwcTvD8nPdc5BjCWJvN6jBfVUzunux1x2egul61kgGEyEU901f/Hpr6zckf9g== X-Received: by 2002:a0c:881c:: with SMTP id 28-v6mr26517616qvl.109.1534414010486; Thu, 16 Aug 2018 03:06:50 -0700 (PDT) X-Google-Smtp-Source: AA+uWPxqwIX09UI9lX2kMiYTF2RAZJUB9Tzl3b7QlthLy55lAmvbtUS+x2czHlKmelQgbWUrwP6h X-Received: by 2002:a0c:881c:: with SMTP id 28-v6mr26517581qvl.109.1534414009932; Thu, 16 Aug 2018 03:06:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534414009; cv=none; d=google.com; s=arc-20160816; b=ZjLK5ATX/9wT2cjUuKqndruM9gWV4UdoXf0eJVdi0RnnbCyarlYXto429RZzhwrFo8 5NbRTB0IVjW3XyGy1dqKr08VTj7Bv5cmOd/PadXWaQmsM9cTcy7QJCuyWEiSilaByNQ4 SgSRYJiZf5VZku+A5vfpXpC9sJqJsrlJ2EsaHRE6F/T5CzKvfCP7xRgg4I2j+PQzR5L7 0kDzkH4e1pRynsfWdwbziP5HeRV5FQXtPmFku7r8u8qf6K57p0OF17S15oH0DCQbBL9v r6ncs79AqseqaZipvVDu8vrBe8l3AvALx0UlN5nxqVYQLSEHTqW1XvUQwkdhKUL7LXVS 096g== 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=58eppWzBrms+oicXZ8vv1kTgC2Dj9f4AShb64br5H2I=; b=OepO0qLUOcmdtiL48AZwBIJvC+jyGqiT9RH4ecGHHcrblYsgnwFgRfvNabRULcCBBq axzIJT9WgnZf5lKw6KUSAxhYzdNQXiefsvEG7VOC1buWfphFNRanUSyA/65Za71HCMqj SexjhemSxaZU8V+8gnaQEhn0n4NkR1qY9LEk9oUmcLPO5Y+hFAZOXWIfX81QXtOXo2NY OG2RCLcIODXvY7KP5Y/70tvKCwQVKECKDSJus+YDJkYXQ7schvPV/bhLFh9ENVwqdxVO rmCy4DiIjh4wmTKH1WXYX40wrnyzIriVkYn2uLPoah5PTvvDJqK2oFtLnz7L0LHfjnIV 3oDQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of david@redhat.com designates 66.187.233.73 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from mx1.redhat.com (mx3-rdu2.redhat.com. [66.187.233.73]) by mx.google.com with ESMTPS id r4-v6si2863534qkc.173.2018.08.16.03.06.49 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Aug 2018 03:06:49 -0700 (PDT) Received-SPF: pass (google.com: domain of david@redhat.com designates 66.187.233.73 as permitted sender) client-ip=66.187.233.73; Authentication-Results: mx.google.com; spf=pass (google.com: domain of david@redhat.com designates 66.187.233.73 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com 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:'' 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 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 Reviewed-by: Pavel Tatashin --- 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;