Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7956751imu; Thu, 15 Nov 2018 04:24:01 -0800 (PST) X-Google-Smtp-Source: AJdET5eN4Nrl6NEqtYXkqBe9T+u1qWWp5ZlsioLXxYgMBHlVFfUH0XpxDI74bXXjFFtZ5angCUvR X-Received: by 2002:a17:902:8f82:: with SMTP id z2-v6mr5964923plo.175.1542284641804; Thu, 15 Nov 2018 04:24:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542284641; cv=none; d=google.com; s=arc-20160816; b=c7fFTL8vKUPfM5MUyQktYxAYhr5b3yCCtT71C8je6LwdQudQr/AWKpLjMQR4cs8/Mt lI3U456UvBotr1ShndwD6ZJDqggC7/U+dkKDNV2v6EfJselPt0QCeaLFfUAuLuAWDXDv anRTX922T6Q1yvCUN5/Jr9617QuSTSD/jbuzWPBx1lFGluX/LuCBGvnwj+zJkoJEMiFD oParnjrz/jr+R24YS3H9PlCDIfnWIS6utZ5rHKaVlTnpWrWXCD/PjzNybHfOpLd7oKay Ig+GvgzgWStGQz6GdvPI0SZW29i+0kQ8lj0TfczvjcN2o+LB0gnI8QCT6koUmJUBGFxa CbiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=JzNio+pmTA+QBs3cao+cHsdM6OO5ZwBORFQLJ0ufiGc=; b=pMtUOHqJqTdZUGbwvulvUko9AsqX5H+Kp0v0LzDPcPEU3b9iu8FnBAukbz2mnBMAN6 6dxVDD7ooj5XMQUCqf6T5qfYFy0yELofnUHtQgJMuzlIX8dS4IJZ5l9rcSxiKXz0X/Tx 3h4TmSMx9xBFe/mBk2mtwSdNhnzUVsr20BeWRMWJmY/09jBaQT/kQihT/Q+SXjGnY65+ cWwCIsvewmE0giOcBdlci8pRBUW5Y01fKEaKGj2FV7TSay1sgiwSh6dczRuLjK/xFTKN UDA9rYCOjywrtj4XmVGS6ea+65TjWk/cn2mn0z4w45bUjMOc8gSfrILn8Ke4WRHytpW8 ftRw== 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g12-v6si26958352plt.215.2018.11.15.04.23.45; Thu, 15 Nov 2018 04:24:01 -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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387892AbeKOWap (ORCPT + 99 others); Thu, 15 Nov 2018 17:30:45 -0500 Received: from mx2.suse.de ([195.135.220.15]:53090 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728699AbeKOWap (ORCPT ); Thu, 15 Nov 2018 17:30:45 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 64AB8B023; Thu, 15 Nov 2018 12:23:05 +0000 (UTC) Date: Thu, 15 Nov 2018 13:23:02 +0100 From: Michal Hocko To: David Hildenbrand Cc: linux-mm@kvack.org, 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, "Rafael J. Wysocki" , Pavel Machek , Len Brown , Andrew Morton , Matthew Wilcox , "Michael S. Tsirkin" Subject: Re: [PATCH RFC 6/6] PM / Hibernate: exclude all PageOffline() pages Message-ID: <20181115122302.GR23831@dhcp22.suse.cz> References: <20181114211704.6381-1-david@redhat.com> <20181114211704.6381-7-david@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181114211704.6381-7-david@redhat.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 14-11-18 22:17:04, David Hildenbrand wrote: [...] > 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; Btw. now that you are touching this file could you also make s@pfn_to_page@pfn_to_online_page@ please? We really do not want to touch offline pfn ranges in general. A separate patch for that of course. Thanks! -- Michal Hocko SUSE Labs