Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7196986imu; Wed, 14 Nov 2018 13:19:34 -0800 (PST) X-Google-Smtp-Source: AJdET5eHo1GKfJ1b3Jhe09kHTxZhQ0iwUjbL7IvajGhNE4iCWHCX0fdRP8JDZW4QPfx4/nF9Idh9 X-Received: by 2002:a63:7a5b:: with SMTP id j27mr3286641pgn.112.1542230374604; Wed, 14 Nov 2018 13:19:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542230374; cv=none; d=google.com; s=arc-20160816; b=GcAb1oxxSlZQp7hHnzxHpQBaf0FGY6FJKSA2BwKwDrOVc4B2HmrEMfx/SWa1JwYHtU 4AklMWpgeKwj9+d7NyW7j5Nx0jFGYqaNzFCZIHaWXapSE3OkExhmswSfjNkrBM2hG2bt wuA1D/A7jQR76ogDn0rxFlLrRqa8WRydRqNR8ENA1YePi1EBnf7Jb+nR7ogbVOPhHJje 5y5oG3J1/wt5+09lOLqqKQr1z4g1jL2zV+5Kl1nRT49lETTtr0lmpr51fNZohH2Qzqf8 JE9aHcde17AdSkveRKYYywMwgWhK7tmixPJn70B5RqSmarrLobAzpPoBCAZGrt8SNC42 tzpQ== 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; bh=ggEKTPs0WEV/jKKiJxHD/vnovOK+0e+ieowuDUjkBXU=; b=w826iXjnWxmdTDTXl6VugD7k0tYKOEhLOIWHIcoglchZYqMxGkUFOQWcZ9SQsva3F6 io+Yj1GrhB0oeakuki73rRnsQE5c+0xY6SHgWrN/BkKWwAv3QbhEBE9TbbWS2WyP0fao NHF7JE7FoNrhd+t6FugkMLpUDQmousHNrjmU3FrU1gA50CqTo17mO0f2doPo7t9B+Xa4 lK6V2f3FtuwPfxCJxfU3SHoej2KoCm2jKIAkmz6MUUsC4Y5x/tlJuJ+ADV2stME+hm6U yAmRHHxNTyAWFbXwgnebv4sHHZOuDyiNOMiyythL9UkLpfix6LdUPoS1sHTZ+OTYBQTD Tl8Q== 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 u6si11418558plz.220.2018.11.14.13.19.19; Wed, 14 Nov 2018 13:19:34 -0800 (PST) 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 S2387522AbeKOHXL (ORCPT + 99 others); Thu, 15 Nov 2018 02:23:11 -0500 Received: from mx1.redhat.com ([209.132.183.28]:57556 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387412AbeKOHXL (ORCPT ); Thu, 15 Nov 2018 02:23:11 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E285430024E1; Wed, 14 Nov 2018 21:18:18 +0000 (UTC) Received: from t460s.redhat.com (ovpn-116-99.ams2.redhat.com [10.36.116.99]) by smtp.corp.redhat.com (Postfix) with ESMTP id CEBDA5C8A4; Wed, 14 Nov 2018 21:18:11 +0000 (UTC) From: David Hildenbrand To: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, devel@linuxdriverproject.org, linux-fsdevel@vger.kernel.org, linux-pm@vger.kernel.org, xen-devel@lists.xenproject.org, David Hildenbrand , "Rafael J. Wysocki" , Pavel Machek , Len Brown , Andrew Morton , Matthew Wilcox , Michal Hocko , "Michael S. Tsirkin" Subject: [PATCH RFC 6/6] PM / Hibernate: exclude all PageOffline() pages Date: Wed, 14 Nov 2018 22:17:04 +0100 Message-Id: <20181114211704.6381-7-david@redhat.com> In-Reply-To: <20181114211704.6381-1-david@redhat.com> References: <20181114211704.6381-1-david@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Wed, 14 Nov 2018 21:18:19 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The content of pages that are marked PG_offline is not of interest (e.g. inflated by a balloon driver), let's skip these pages. Cc: "Rafael J. Wysocki" Cc: Pavel Machek Cc: Len Brown Cc: Andrew Morton Cc: Matthew Wilcox Cc: Michal Hocko Cc: "Michael S. Tsirkin" Signed-off-by: David Hildenbrand --- kernel/power/snapshot.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kernel/power/snapshot.c b/kernel/power/snapshot.c index b0308a2c6000..01db1d13481a 100644 --- a/kernel/power/snapshot.c +++ b/kernel/power/snapshot.c @@ -1222,7 +1222,7 @@ static struct page *saveable_highmem_page(struct zone *zone, unsigned long pfn) BUG_ON(!PageHighMem(page)); if (swsusp_page_is_forbidden(page) || swsusp_page_is_free(page) || - PageReserved(page)) + PageReserved(page) || PageOffline(page)) return NULL; if (page_is_guard(page)) @@ -1286,6 +1286,9 @@ static struct page *saveable_page(struct zone *zone, unsigned long pfn) if (swsusp_page_is_forbidden(page) || swsusp_page_is_free(page)) return NULL; + if (PageOffline(page)) + return NULL; + if (PageReserved(page) && (!kernel_page_present(page) || pfn_is_nosave(pfn))) return NULL; -- 2.17.2