Skip to content

RFC include storage keys in hibernation image

Martin Schwidefsky linux-pm linux-s390 lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest1 patch 22 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1include storage keys in hibernation image.arch/s390/kernel/swsusp_asm64.S kernel/power/snapshot.c+151 -022 replies
1/1include storage keys in hibernation image.arch/s390/kernel/swsusp_asm64.S kernel/power/snapshot.c+151 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [patch 0/1] [RFC] include storage keys in hibernation image

Greetings,

we have discovered a shortcoming of the s390 support for supend to disk. The problem is that we currently do not save and restore the storage keys - the one additional byte associated with each 4K page, a unique property of s390. The resume from disk will read the hibernation image from disk and restore the original pages. The I/O or the memory move for safe pages will set the referenced and the dirty bit in the storage key for every restored page. Without a reset to the state before the hibernation cycle the pages will appear to be dirty which causes problems for e.g. read-only filesystems.

The solution implemented with this patch saves the storage key in the upper 8 bits of the page-frame-numbers. The code adds 6 new function in kernel/power/snapshot.c which are conditionally defined with CONFIG_S390. The call sites of these functions are scattered in the snapshot code which makes it hard to find a better abstraction for the interface. The comments should make clear what the functions do.

Signature · 4 lines
blue skies,
   Martin.

"Reality continues to ruin my life." - Calvin.