Skip to contentSkip to conversation

not enough memory

swsusp Richard Mittendorfer 3 participants 11 messages Feb 17, 2006 – May 2, 2006

lore
Share & tools
lore
#0 lore raw

Hi *,

On my 64MB notebook I get the following message, when going swsusp:

..
swsusp: Need to copy 15526 pages
swsusp: Not enough free memory
Error -12 suspending
..

# free
             total     used     free   shared    buffers   cached
Mem:         62760    59884     2876        0       3828    16052
-/+ buffers/cache:    40004    22756
Swap:       200804    30316   170488

If I end all apps but the XServer it works. I've allready added some more swapspace, but that didn't help. So, how much memory will I need for a successful suspend or better (since i can't stuff any more into it) is there a way to minimize the amount needed?

sl ritch

#1 lore raw

Hi Richard.

Quoted 16 lines · Richard Mittendorfer

Hi *,

On my 64MB notebook I get the following message, when going swsusp:

..
swsusp: Need to copy 15526 pages
swsusp: Not enough free memory
Error -12 suspending
..

# free
             total     used     free   shared    buffers   cached
Mem:         62760    59884     2876        0       3828    16052
-/+ buffers/cache:    40004    22756
Swap:       200804    30316   170488
Quoted 4 lines

If I end all apps but the XServer it works. I've allready added some more swapspace, but that didn't help. So, how much memory will I need for a successful suspend or better (since i can't stuff any more into it) is there a way to minimize the amount needed?

swsusp needs to be able to free half your memory to be able to suspend. I don't know it intimately, but you may well be failing to do this. Being completely biased (and not unwilling to admit it!), I'd suggest you try Suspend2 (www.suspend2.net). It doesn't have such a limitation.

Regards,

Nigel

#2 lore raw

Also sprach Nigel Cunningham <[email protected]> (Sat, 18 Feb 2006 10:07:58 +1000):

Quoted 1 line

Hi Richard.

Hello Nigel,

Quoted 10 lines · Richard Mittendorfer
Quoted 4 lines

swsusp: Need to copy 15526 pages
swsusp: Not enough free memory
Error -12 suspending
[...]

swsusp needs to be able to free half your memory to be able to suspend. I don't know it intimately, but you may well be failing to do this. Being completely biased (and not unwilling to admit it!), I'd suggest you try Suspend2 (www.suspend2.net). It doesn't have such a limitation.

Thanks for this hint. However, I'm using ck's patches and having errors compiling sched.c. Just took a quick look: I don't think I can get them working together. The rest of the suspend2 patch (for 2.6.15.1) seems to apply fine to 2.6.15.4 also (Not much changes IIRC).

Quoted 3 lines

Regards,

Nigel

sl ritch

#3 lore raw

Hi.

Quoted 19 lines · Richard Mittendorfer

Also sprach Nigel Cunningham <[email protected]> (Sat, 18 Feb

2006 10:07:58 +1000):

Quoted 1 line

Hi Richard.

Hello Nigel,

Quoted 11 lines · Richard Mittendorfer
Quoted 4 lines

swsusp: Need to copy 15526 pages
swsusp: Not enough free memory
Error -12 suspending
[...]

swsusp needs to be able to free half your memory to be able to suspend. I don't know it intimately, but you may well be failing to do this. Being completely biased (and not unwilling to admit it!), I'd suggest you try Suspend2 (www.suspend2.net). It doesn't have such a limitation.

Quoted 4 lines

Thanks for this hint. However, I'm using ck's patches and having errors compiling sched.c. Just took a quick look: I don't think I can get them working together. The rest of the suspend2 patch (for 2.6.15.1) seems to apply fine to 2.6.15.4 also (Not much changes IIRC).

http://iphitus.loudas.com/archck.php contains both Con's patches and Suspend2.

Regards,

Nigel

Quoted 5 lines
Quoted 3 lines

Regards,

Nigel

sl ritch

#4 lore raw

Also sprach Nigel Cunningham <[email protected]> (Sat, 18 Feb 2006 10:41:07 +1000):

Quoted 1 line

Hi.

Hi,

Quoted 15 lines · Richard Mittendorfer
Quoted 14 lines

Also sprach Nigel Cunningham <[email protected]> (Sat, 18 Feb 2006 10:07:58 +1000):

Quoted 11 lines · Richard Mittendorfer
Quoted 4 lines

swsusp: Need to copy 15526 pages
swsusp: Not enough free memory
Error -12 suspending
[...]

swsusp needs to be able to free half your memory to be able to suspend. I don't know it intimately, but you may well be failing to do this. Being completely biased (and not unwilling to admit it!), I'd suggest you try Suspend2 (www.suspend2.net). It doesn't have such a limitation.

Quoted 8 lines
Quoted 5 lines

Thanks for this hint. However, I'm using ck's patches and having errors compiling sched.c. Just took a quick look: I don't think I can get them working together. The rest of the suspend2 patch (for 2.6.15.1) seems to apply fine to 2.6.15.4 also (Not much changes IIRC).

http://iphitus.loudas.com/archck.php contains both Con's patches and Suspend2.

Ha! If everthing would work out that smoothly. :-)

Quoted 3 lines

Regards,

Nigel

big THX, ritch

#5 lore raw

Hi.

Quoted 25 lines · Richard Mittendorfer
Quoted 16 lines · Richard Mittendorfer
Quoted 15 lines

Also sprach Nigel Cunningham <[email protected]> (Sat, 18 Feb

2006 10:07:58 +1000):

Quoted 11 lines · Richard Mittendorfer
Quoted 4 lines

swsusp: Need to copy 15526 pages
swsusp: Not enough free memory
Error -12 suspending
[...]

swsusp needs to be able to free half your memory to be able to suspend. I don't know it intimately, but you may well be failing to do this. Being completely biased (and not unwilling to admit it!), I'd suggest you try Suspend2 (www.suspend2.net). It doesn't have such a limitation.

Quoted 8 lines
Quoted 5 lines

Thanks for this hint. However, I'm using ck's patches and having errors compiling sched.c. Just took a quick look: I don't think I can get them working together. The rest of the suspend2 patch (for 2.6.15.1) seems to apply fine to 2.6.15.4 also (Not much changes IIRC).

http://iphitus.loudas.com/archck.php contains both Con's patches and Suspend2.

Quoted 7 lines

Ha! If everthing would work out that smoothly. :-)

Quoted 3 lines

Regards,

Nigel

big THX, ritch

You're welcome ;) If you have any further problems, feel free to email again. Better still, try the Suspend2 site and mailing lists - we've got some really good docs and really helpful users. There's also an irc channel on Freenode.

Regards,

Nigel

#6 lore raw
In reply to Nigel Cunningham

Hi!

Quoted 19 lines
Quoted 14 lines

On my 64MB notebook I get the following message, when going swsusp:

..
swsusp: Need to copy 15526 pages
swsusp: Not enough free memory
Error -12 suspending
..

# free
             total     used     free   shared    buffers   cached
Mem:         62760    59884     2876        0       3828    16052
-/+ buffers/cache:    40004    22756
Swap:       200804    30316   170488
Quoted 4 lines

If I end all apps but the XServer it works. I've allready added some more swapspace, but that didn't help. So, how much memory will I need for a successful suspend or better (since i can't stuff any more into it) is there a way to minimize the amount needed?

Quoted 4 lines

swsusp needs to be able to free half your memory to be able to suspend. I don't know it intimately, but you may well be failing to do this. Being completely biased (and not unwilling to admit it!), I'd suggest you try Suspend2 (www.suspend2.net). It doesn't have such a limitation.

Actually suspend2 has exactly the same limitation. If more than half memory is occupied by something else than disk caches, you loose in swsusp and suspend2.

Signature · 1 line
64 bytes from 195.113.31.123: icmp_seq=28 ttl=51 time=448769.1 ms         
#7 lore raw
In reply to Richard Mittendorfer
Quoted 16 lines · Richard Mittendorfer

Hi *,

On my 64MB notebook I get the following message, when going swsusp:

..
swsusp: Need to copy 15526 pages
swsusp: Not enough free memory
Error -12 suspending
..

# free
             total     used     free   shared    buffers   cached
Mem:         62760    59884     2876        0       3828    16052
-/+ buffers/cache:    40004    22756
Swap:       200804    30316   170488
Quoted 4 lines

If I end all apps but the XServer it works. I've allready added some more swapspace, but that didn't help. So, how much memory will I need for a successful suspend or better (since i can't stuff any more into it) is there a way to minimize the amount needed?

128MB should be enough for you. Or try modifying try_to_free memory routine to retry shrink_all_mem few more times, with schedule() in between...

Signature · 1 line
64 bytes from 195.113.31.123: icmp_seq=28 ttl=51 time=448769.1 ms         
#8 lore raw

Also sprach Pavel Machek <[email protected]> (Sat, 18 Feb 2006 16:11:16 +0100):

Quoted 7 lines · Richard Mittendorfer
Quoted 4 lines

If I end all apps but the XServer it works. I've allready added some more swapspace, but that didn't help. So, how much memory will I need for a successful suspend or better (since i can't stuff any more into it) is there a way to minimize the amount needed?

128MB should be enough for you.

Swap? 128M was my first attempt -- OOM when the box was heavily loaded. IIRC no effect on swsusp - there are 64M Ram + 2M Video + Kernel + X?. The reason I did it were some google results talking about free pages. There were some solutions talking about adding swap.

(Ram? Would be the way to go, but it's fully loaded.)

Quoted 3 lines

Or try modifying try_to_free memory
routine to retry shrink_all_mem few more times, with schedule() in between...

Uhh. I don't think this will be a good idea /me ha[ck|rm]ing good ol' linux source. ;-)

sl ritch

#9 lore raw
Quoted 8 lines · Richard Mittendorfer

Also sprach Pavel Machek <[email protected]> (Sat, 18 Feb 2006 16:11:16 +0100):

Quoted 6 lines · Richard Mittendorfer
Quoted 4 lines

If I end all apps but the XServer it works. I've allready added some more swapspace, but that didn't help. So, how much memory will I need for a successful suspend or better (since i can't stuff any more into it) is there a way to minimize the amount needed?

Quoted 8 lines
Quoted 1 line

128MB should be enough for you.

Swap? 128M was my first attempt -- OOM when the box was heavily loaded. IIRC no effect on swsusp - there are 64M Ram + 2M Video + Kernel + X?. The reason I did it were some google results talking about free pages. There were some solutions talking about adding swap.

(Ram? Would be the way to go, but it's fully loaded.)

RAM. No ammount of swap will help you.

Quoted 6 lines
Quoted 3 lines

Or try modifying try_to_free memory
routine to retry shrink_all_mem few more times, with schedule() in between...

Uhh. I don't think this will be a good idea /me ha[ck|rm]ing good ol' linux source. ;-)

It should be easy. It is quite hard to loose much data this way ;-).

Pavel

Signature · 1 line
Web maintainer for suspend.sf.net (www.sf.net/projects/suspend) wanted...
#10 lore raw

Re: [swsusp] not enough memory [solved with 2.6.17-rc3]

In reply to Richard Mittendorfer

Also sprach Richard Mittendorfer <[email protected]> (Sat, 18 Feb 2006 00:58:14 +0100):

Quoted 14 lines

On my 64MB notebook I get the following message, when going swsusp:

..
swsusp: Need to copy 15526 pages
swsusp: Not enough free memory
Error -12 suspending
..

# free
             total     used     free   shared    buffers   cached
Mem:         62760    59884     2876        0       3828    16052
-/+ buffers/cache:    40004    22756
Swap:       200804    30316   170488
Quoted 4 lines

If I end all apps but the XServer it works. I've allready added some more swapspace, but that didn't help. So, how much memory will I need for a successful suspend or better (since i can't stuff any more into it) is there a way to minimize the amount needed?

Seems fixed with 2.6.17-rc3. Field-testet on the loaded box several times.

_._. .._ _ .... . ._. . __..__ _._. .._ _ .... . ._. .
libre powermanagement[2300]: suspend to disk.
libre powermanagement[2309]: Found some modules loaded .. unloading
libre kernel: ACPI: PCI interrupt for device 0000:05:00.0 disabled
libre kernel: ath_pci: driver unloaded
libre kernel: Stopping tasks: ====================================================| libre kernel: Shrinking memory... ^H-^H\^Hdone (10007 pages freed)
libre kernel: ACPI: PCI interrupt for device 0000:00:13.1 disabled
libre kernel: ACPI: PCI interrupt for device 0000:00:13.0 disabled
libre kernel: swsusp: Need to copy 6061 pages
libre kernel: ACPI: PCI Interrupt 0000:00:13.0[A] -> Link [LNKA] -> GSI 11 (level, low) -> IRQ 11 libre kernel: PCI: Setting latency timer of device 0000:00:13.0 to 64
libre kernel: ACPI: PCI Interrupt 0000:00:13.1[B] -> Link [LNKB] -> GSI 11 (level, low) -> IRQ 11 libre kernel: PCI: Setting latency timer of device 0000:00:13.1 to 64
libre kernel: Restarting tasks... done
libre powermanagement[2344]: Reloading modules ..
_._. .._ _ .... . ._. . __..__ _._. .._ _ .... . ._. .

big THX,

ritch