[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160912113238.GA30927@amd>
Date: Mon, 12 Sep 2016 13:32:38 +0200
From: Pavel Machek <pavel@....cz>
To: Anisse Astier <anisse@...ier.eu>
Cc: linux-mm@...ck.org, linux-pm@...r.kernel.org,
"Kirill A . Shutemov" <kirill.shutemov@...ux.intel.com>,
Laura Abbott <labbott@...oraproject.org>,
Mel Gorman <mgorman@...e.de>,
"Rafael J . Wysocki" <rjw@...ysocki.net>,
Alan Cox <gnomes@...rguk.ukuu.org.uk>,
Andi Kleen <andi@...stfloor.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Brad Spengler <spender@...ecurity.net>,
Dave Hansen <dave.hansen@...el.com>,
David Rientjes <rientjes@...gle.com>,
Jianyu Zhan <nasa4836@...il.com>,
Kees Cook <keescook@...omium.org>,
Len Brown <len.brown@...el.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Mathias Krause <minipli@...glemail.com>,
Michal Hocko <mhocko@...e.com>,
PaX Team <pageexec@...email.hu>,
Peter Zijlstra <peterz@...radead.org>,
Vlastimil Babka <vbabka@...e.cz>,
Yves-Alexis Perez <corsac@...ian.org>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] PM / Hibernate: allow hibernation with
PAGE_POISONING_ZERO
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 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@...ier.eu>
> Cc: Kirill A. Shutemov <kirill.shutemov@...ux.intel.com>
> Cc: Laura Abbott <labbott@...oraproject.org>
> Cc: Mel Gorman <mgorman@...e.de>
> Cc: Rafael J. Wysocki <rjw@...ysocki.net>
Looks reasonable to me.
Acked-by: Pavel Machek <pavel@....cz>
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
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Powered by blists - more mailing lists