Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1481159 > unrolled thread

Re: [PATCH] PM / Hibernate: allow hibernation with PAGE_POISONING_ZERO

Started byPavel Machek <pavel@ucw.cz>
First post2016-09-12 13:40 +0200
Last post2016-09-12 19:50 +0200
Articles 2 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] PM / Hibernate: allow hibernation with  PAGE_POISONING_ZERO Pavel Machek <pavel@ucw.cz> - 2016-09-12 13:40 +0200
    Re: [PATCH] PM / Hibernate: allow hibernation with  PAGE_POISONING_ZERO Pavel Machek <pavel@ucw.cz> - 2016-09-12 19:50 +0200

#1481159 — Re: [PATCH] PM / Hibernate: allow hibernation with PAGE_POISONING_ZERO

FromPavel Machek <pavel@ucw.cz>
Date2016-09-12 13:40 +0200
SubjectRe: [PATCH] PM / Hibernate: allow hibernation with PAGE_POISONING_ZERO
Message-ID<sgxKG-2Ci-21@gated-at.bofh.it>
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@astier.eu>
> Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
> Cc: Laura Abbott <labbott@fedoraproject.org>
> Cc: Mel Gorman <mgorman@suse.de>
> Cc: Rafael J. Wysocki <rjw@rjwysocki.net>

Looks reasonable to me.

Acked-by: Pavel Machek <pavel@ucw.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

[toc] | [next] | [standalone]


#1481750

FromPavel Machek <pavel@ucw.cz>
Date2016-09-12 19:50 +0200
Message-ID<sgDwL-6qC-67@gated-at.bofh.it>
In reply to#1481159
Hi!

On Mon 2016-09-12 17:19:54, Anisse Astier wrote:
> Le 12 sept. 2016 13:32, "Pavel Machek" <pavel@ucw.cz> a écrit :
> >
> > 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@astier.eu>
> > > Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
> > > Cc: Laura Abbott <labbott@fedoraproject.org>
> > > Cc: Mel Gorman <mgorman@suse.de>
> > > Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
> >
> > Looks reasonable to me.
> >
> > Acked-by: Pavel Machek <pavel@ucw.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
> > --
> 
> I have no opposition on doing this unconditionally. I can send a v2 as soon
> as I get closer to a computer.

Actually, I'd keep this one as is, when it works and there are no
problems for a release or so, we can delete the ifdefs.

Thanks!
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web