# Re: \[PATCH\] PM / Hibernate: allow hibernation with PAGE\_POISONING\_ZERO

- From: Pavel Machek \<hidden\>
- Date: 2016-09-12 11:32:45 
- List: linux-pm
- Page: https://ratatoskr.run/linux-pm/2016/09/4833686
- Thread: https://ratatoskr.run/linux-mm/2016/09/4832269/t.md

```text
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 <redacted>
> Cc: Kirill A. Shutemov <redacted>
> Cc: Laura Abbott <redacted>
> Cc: Mel Gorman <mgorman@suse.de>
> Cc: Rafael J. Wysocki <redacted>

Looks reasonable to me.

Acked-by: Pavel Machek <redacted>

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

--
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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
```
