From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf0-f71.google.com (mail-lf0-f71.google.com [209.85.215.71]) by kanga.kvack.org (Postfix) with ESMTP id 2C10B6B0260 for ; Mon, 12 Sep 2016 11:20:17 -0400 (EDT) Received: by mail-lf0-f71.google.com with SMTP id n4so90268447lfb.3 for ; Mon, 12 Sep 2016 08:20:17 -0700 (PDT) Received: from mail-wm0-x243.google.com (mail-wm0-x243.google.com. [2a00:1450:400c:c09::243]) by mx.google.com with ESMTPS id bp3si15638579wjc.217.2016.09.12.08.19.55 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Sep 2016 08:19:56 -0700 (PDT) Received: by mail-wm0-x243.google.com with SMTP id z194so1761685wmd.3 for ; Mon, 12 Sep 2016 08:19:55 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20160912113238.GA30927@amd> References: <1473410612-6207-1-git-send-email-anisse@astier.eu> <20160912113238.GA30927@amd> From: Anisse Astier Date: Mon, 12 Sep 2016 17:19:54 +0200 Message-ID: Subject: Re: [PATCH] PM / Hibernate: allow hibernation with PAGE_POISONING_ZERO Content-Type: multipart/alternative; boundary=089e0158c14848285d053c510717 Sender: owner-linux-mm@kvack.org List-ID: To: Pavel Machek Cc: David Rientjes , Michal Hocko , linux-pm@vger.kernel.org, Mathias Krause , Andrew Morton , "Rafael J . Wysocki" , Laura Abbott , linux-mm@kvack.org, Brad Spengler , Jianyu Zhan , Linus Torvalds , Vlastimil Babka , "Kirill A . Shutemov" , Yves-Alexis Perez , Kees Cook , linux-kernel@vger.kernel.org, Andi Kleen , Len Brown , Alan Cox , PaX Team , Dave Hansen , Mel Gorman , Peter Zijlstra --089e0158c14848285d053c510717 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Le 12 sept. 2016 13:32, "Pavel Machek" a =C3=A9crit : > > On Fri 2016-09-09 10:43:32, Anisse Astier wrote: > > PAGE_POISONING_ZERO disables zeroing new pages on alloc, they are > > poisoned (zeroed) as they become available. > > In the hibernate use case, free pages will appear in the system without > > being cleared, left there by the loading kernel. > > > > This patch will make sure free pages are cleared on resume when > > PAGE_POISONING_ZERO is enabled. We free the pages just after resume > > because we can't do it later: going through any device resume code migh= t > > allocate some memory and invalidate the free pages bitmap. > > > > Thus we don't need to disable hibernation when PAGE_POISONING_ZERO is > > enabled. > > > > Signed-off-by: Anisse Astier > > Cc: Kirill A. Shutemov > > Cc: Laura Abbott > > Cc: Mel Gorman > > Cc: Rafael J. Wysocki > > Looks reasonable to me. > > Acked-by: Pavel Machek > > Actually.... this takes basically zero time come. Do we want to do it > unconditionally? > > (Yes, it is free memory, but for sake of debugging, I guess zeros are > preffered to random content that changed during hibernation.) > > (But that does not change the Ack.) > > Best regards, > Pavel > -- I have no opposition on doing this unconditionally. I can send a v2 as soon as I get closer to a computer. Regards, Anisse Sorry for the brevity, I'm posting this on mobile. --089e0158c14848285d053c510717 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

Le=C2=A012 sept. 2016 13:32, "Pavel Machek" <pavel@ucw.cz> a =C3=A9crit=C2=A0:
>
> On Fri 2016-09-09 10:43:32, Anisse Astier wrote:
> > PAGE_POISONING_ZERO disables zeroing new pages on alloc, they are=
> > poisoned (zeroed) as they become available.
> > In the hibernate use case, free pages will appear in the system w= ithout
> > being cleared, left there by the loading kernel.
> >
> > This patch will make sure free pages are cleared on resume when > > PAGE_POISONING_ZERO is enabled. We free the pages just after resu= me
> > because we can't do it later: going through any device resume= code might
> > allocate some memory and invalidate the free pages bitmap.
> >
> > Thus we don't need to disable hibernation when PAGE_POISONING= _ZERO is
> > enabled.
> >
> > Signed-off-by: Anisse Astier <anisse@astier.eu>
> > Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
> > Cc: Laura Abbott <labbott@fedoraproject.org>
> > Cc: Mel Gorman <mgorman@sus= e.de>
> > Cc: Rafael J. Wysocki <rj= w@rjwysocki.net>
>
> Looks reasonable to me.
>
> Acked-by: Pavel Machek <pavel@ucw.c= z>
>
> Actually.... this takes basically zero time come. Do we want to do it<= br> > unconditionally?
>
> (Yes, it is free memory, but for sake of debugging, I guess zeros are<= br> > preffered to random content that changed during hibernation.)
>
> (But that does not change the Ack.)
>
> Best regards,
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Pavel
> --

I have no opposition on doing this unconditionally. I can se= nd a v2 as soon as I get closer to a computer.

Regards,

Anisse

Sorry for the brevity, I'm posting this on mobile.

--089e0158c14848285d053c510717-- -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org