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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Friday 13 November 2009, Thomas Petazzoni wrote:
> Hello,
> 
> Le Thu, 12 Nov 2009 21:01:55 +0100,
> Thomas Petazzoni <thomas.petazzoni@xxxxxxxxxxxxxxxxxx> 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.

Yes, it does.

> 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 ?

No, the kernel doesn't use the swap space already in use for saving the
image.  Also, s2disk uses the kernel for allocating swap space in which to
save the image, so it avoids overwriting the swap space in use too.

Thanks,
Rafael
_______________________________________________
linux-pm mailing list
linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/linux-pm


[Index of Archives]     [Linux ACPI]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [CPU Freq]     [Kernel Newbies]     [Fedora Kernel]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux