Re: Memory consumption difference between in-kernel and userspace hibernation

Thomas Petazzoni
2009-11-13T09:52:34Z

Hello,

Le Thu, 12 Nov 2009 21:01:55 +0100,
Thomas Petazzoni <thomas.petazzoni@free-electrons.com> a écrit :

> Question: is there any difference in terms of memory requirements for
> the in-kernel hibernation (echo disk > /sys/power/state) and the
> userspace hibernation interface (through /dev/snapshot) ? With exactly
> the same userspace workload and applications running, the in-kernel
> hibernation works, but the hibernating using the userspace hibernation
> interface fails because not enough memory can be freed.

The difference is that when using the in-kernel solution, a swap is
enabled, and it seems that it allows the kernel to free some memory in
order to create the snapshot.

But I don't understand why : won't the swap contents be completely
erased when the resume image will be written to it, and therefore all
the things migrated to the swap when freing the memory would be lost ?

Thanks for your input,

Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers and embedded Linux development,
consulting, training and support.