FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Kernel

 
 
LinkBack Thread Tools
 
Old 07-18-2010, 05:23 PM
Javier Vasquez
 
Default Bug#589558: Miscalculation of used/available pages on kernel suspend to disk (not suspending)

Package: linux-image-2.6.32-5-686
Version: 2.6.32-17
Severity: important

I have debian unstable installed on a laptop Dell Inspiron 600m,
with pentium M processor at 1.6 GHz:

% cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 9
model name : Intel(R) Pentium(R) M processor 1600MHz
stepping : 5
cpu MHz : 1600.000
cache size : 1024 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr mce cx8 sep mtrr pge mca cmov
clflush dts acpi mmx fxsr sse sse2 tm pbe up bts est tm2
bogomips : 3189.09
clflush size : 64
cache_alignment : 64
address sizes : 32 bits physical, 32 bits virtual
power management:

The laptop includes 512 MB of RAM, and a partition with 2 GB of swap:

% cat /proc/meminfo
MemTotal: 514432 kB
MemFree: 100192 kB
Buffers: 21396 kB
Cached: 152088 kB
SwapCached: 0 kB
Active: 240888 kB
Inactive: 141424 kB
Active(anon): 162184 kB
Inactive(anon): 47256 kB
Active(file): 78704 kB
Inactive(file): 94168 kB
Unevictable: 0 kB
Mlocked: 0 kB
HighTotal: 0 kB
HighFree: 0 kB
LowTotal: 514432 kB
LowFree: 100192 kB
SwapTotal: 2096408 kB
SwapFree: 2096396 kB
Dirty: 4 kB
Writeback: 0 kB
AnonPages: 208828 kB
Mapped: 40536 kB
Shmem: 612 kB
Slab: 10976 kB
SReclaimable: 4584 kB
SUnreclaim: 6392 kB
KernelStack: 984 kB
PageTables: 1464 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 2353624 kB
Committed_AS: 362324 kB
VmallocTotal: 504128 kB
VmallocUsed: 18188 kB
VmallocChunk: 473956 kB
HardwareCorrupted: 0 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 4096 kB
DirectMap4k: 290488 kB
DirectMap4M: 233472 kB

A brief from the meminfo:

MemTotal: 514432 kB
SwapTotal: 2096408 kB

Most of the time when trying to perform a kernel suspend to disk,
whether by using "acpitool -S", which is my preferred method, or
by directly writing "disk" into "/sys/power/state", the suspend is
attempted, but it fails and the machine returns to state priot to
attempt...

When looking at dmesg:

[ 90.737713] Freezing user space processes ... (elapsed 0.00 seconds) done.
[ 90.752182] Freezing remaining freezable tasks ... (elapsed 0.00
seconds) done.
[ 90.766427] PM: Preallocating image memory... done (allocated 61556 pages)
[ 90.817030] PM: Allocated 246224 kbytes in 0.03 seconds (8207.46 MB/s)
[ 90.831363] Suspending console(s) (use no_console_suspend to debug)
[ 90.847537] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[ 90.849254] parport_pc 00:0c: disabled
[ 90.850417] serial 00:0b: disabled
[ 90.972175] ipw2100 0000:02:03.0: PCI INT A disabled
[ 92.656557] tg3 0000:02:00.0: PME# enabled
[ 92.656568] pci 0000:00:1e.0: wake-up capability enabled by ACPI
[ 92.779840] Intel ICH Modem 0000:00:1f.6: PCI INT B disabled
[ 92.792231] Intel ICH 0000:00:1f.5: PCI INT B disabled
[ 92.792380] ata_piix 0000:00:1f.1: PCI INT A disabled
[ 92.795306] ACPI: Preparing to enter system sleep state S4
[ 92.795583] PM: Saving platform NVS memory
[ 92.795672] Disabling non-boot CPUs ...
[ 92.795783] PM: Creating hibernation image:
[ 92.796017] PM: Need to copy 66237 pages
[ 92.796017] PM: Normal pages needed: 66237 + 1024, available pages: 64647
[ 92.796017] PM: Not enough free memory
[ 92.796017] PM: Error -12 creating hibernation image
[ 92.796716] ACPI: Waking up from system sleep state S4

The important part of the dmesg section above is:

[ 92.796017] PM: Need to copy 66237 pages
[ 92.796017] PM: Normal pages needed: 66237 + 1024, available pages: 64647
[ 92.796017] PM: Not enough free memory
[ 92.796017] PM: Error -12 creating hibernation image

According to the kernel, there's a need of 67261 pages, when there are
available only 64647. This is pretty weird, given that RAM size is
only 512 MB, while swap partition is 2 GB, 4 times bigger, so there should
be no issue.

This kernel suspend to disk has always worked for me on this laptop, under
debian unstable, and under other distros, like arch gnu/linux. I stopped
using debian for a while and then recently installed debian unstable again,
which came with linux-image-2.6.32-5-686, and since then it hasn't worked.

There's an exception... Prior to current version (2.6.32-17) there was one
which after which current one came after upgrade, which seemde to have fixed
the issue, but as soon as I performed an upgrade and got current one, the
issue cam back again. So there was a particular version which I'm not sure
which one it is (perhaps previous to current one) which was issue free, but
current one, and previous to that I mentioned, all exposed the same problem.

To mitigate the issue, I do "swapoff -a && swapon -a" prior to suspending to
disk, and that doesn't seem to help a bit. I've also set a swappiness of 10
(vm.swappiness=10 under /etc/sysctl.d/swappiness.conf) so that I try keeping
the swap area as unused as possible, and that hadn't helped much either.

I think the problem might be some configuration inhibiting the proper
calculation of pages... As a side note, when I was using arch, with kernel
verison from 2.6.32.* to 2.6.34.*, I didn't have any problem suspending to
disk. Also, I'm using same kernel suspend to disk on a amd64 laptop, and
on 2 non laptop old boxes, and on them the method works OK, so it might be
some configuration specific to this laptop?

-- Package-specific info:
** Version:
Linux version 2.6.32-5-686 (Debian 2.6.32-17) (ben@decadent.org.uk)
(gcc version 4.3.5 (Debian 4.3.5-1) ) #1 SMP Sun Jul 11 02:12:03 UTC
2010

** Command line:
BOOT_IMAGE=/vmlinuz-2.6.32-5-686
root=UUID=b093a899-8278-406a-8698-343dbfdfca4b ro resume=/dev/sda5

-- System Information:
Debian Release: unstable/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-5-686 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

% uname -a
Linux m0 2.6.32-5-686 #1 SMP Sun Jul 11 02:12:03 UTC 2010 i686 GNU/Linux

Thanks,

--
Javier.



--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: AANLkTikpCDFnig3HoByoH5TFdcjFpDnHShLlKiz-4Ddv@mail.gmail.com">http://lists.debian.org/AANLkTikpCDFnig3HoByoH5TFdcjFpDnHShLlKiz-4Ddv@mail.gmail.com
 
Old 09-25-2010, 09:11 PM
Javier Vasquez
 
Default Bug#589558: Miscalculation of used/available pages on kernel suspend to disk (not suspending)

An additional detail is that apparently:

echo 0 > /sys/power/image_size

Makes things work... I haven't tested enough to confirm though,
neither I would know what exahustive kind of test would be required,
but from couple of trials, it seems to work. Thanks to Ben Livengood
who e-mailed me to try this...

I still don't understand why the issue given that
/sys/power/image_size controls the image size to be restored (best
effort to try to keep it as small as indicated, though if not possible
it'll be bigger). By default it's set to 500 MB... What is not clear
to me if this setting helps as it seems, is why if the size is limited
to 500 MB or a bit more, that would represent a problem given the swap
space available? Now if the logic to apply is different, like as the
RAM is 512 MB, perhaps it doesn't fit into 500 MB limit, which might
be the case, but the documentation indicates it's best effort, meaning
it can get bigger if it's not possible to make it fit, and even if a
bit bigger, then there's plenty of swap in comparison.

Any ways, with those questions at hand, then even if 500 MB is the
default value for linux, why not making it 0 the default for debian?
As I see it 0 doesn't hurt, and it's the more secure value, since it
will always tend to minimize the image sizze to be restored, which in
turns might also accelerate resume time...

Thanks,

--
Javier.



--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: AANLkTi=aCth9G2mBwSJJAWNJAvjBvxZZ3Dn8fjcjJZf5@mail .gmail.com">http://lists.debian.org/AANLkTi=aCth9G2mBwSJJAWNJAvjBvxZZ3Dn8fjcjJZf5@mail .gmail.com
 
Old 11-27-2011, 05:10 AM
Jonathan Nieder
 
Default Bug#589558: Miscalculation of used/available pages on kernel suspend to disk (not suspending)

tags 589558 + moreinfo
quit

Hi Javier,

Javier Vasquez wrote:

> MemTotal: 514432 kB
> SwapTotal: 2096408 kB
[...]
> [ 92.795783] PM: Creating hibernation image:
> [ 92.796017] PM: Need to copy 66237 pages
> [ 92.796017] PM: Normal pages needed: 66237 + 1024, available pages: 64647
> [ 92.796017] PM: Not enough free memory
> [ 92.796017] PM: Error -12 creating hibernation image
> [ 92.796716] ACPI: Waking up from system sleep state S4
>
> The important part of the dmesg section above is:
>
> [ 92.796017] PM: Need to copy 66237 pages
> [ 92.796017] PM: Normal pages needed: 66237 + 1024, available pages: 64647
> [ 92.796017] PM: Not enough free memory
> [ 92.796017] PM: Error -12 creating hibernation image

Yeah, that looks broken.

Does this still happen with current squeeze kernels? If so, please
try a 3.x.y kernel from unstable; the only packages from outside
squeeze that should be needed in order to do so aside from the kernel
image itself are initramfs-tools and linux-base. If it fails, we can
get help from upstream, and if it succeeds, we can try some kernels
halfway between from http://snapshot.debian.org/ to find the fix and
try applying the same patch to squeeze.

Thanks for writing, and sorry for the slow response.

Sincerely,
Jonathan



--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20111127061029.GA14516@elie.hsd1.il.comcast.net">h ttp://lists.debian.org/20111127061029.GA14516@elie.hsd1.il.comcast.net
 

Thread Tools




All times are GMT. The time now is 08:31 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org