lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 17 Nov 2010 22:19:17 +0100
From:	Pavel Machek <pavel@....cz>
To:	"Rafael J. Wysocki" <rjw@...k.pl>
Cc:	kernel list <linux-kernel@...r.kernel.org>,
	Linux-pm mailing list <linux-pm@...ts.linux-foundation.org>
Subject: Re: 2.6.37-rc1+: hibernate regression, claims not enough swap space

Hi!

> > > > ...but there's enough -- or at least it was enough to fit previous
> > > > versions. 32-bit machine, so it has highmem.
> > > > 
> > > > System is in console mode, very lightly loaded.
> > > > 
> > > > Mem:   2054716k total,   736548k used,  1318168k free,    15368k buffers
> > > > Swap:   779148k total,     2360k used,   776788k free,   546388k cached
> > > 
> > > Well, the swap is rather in short supply.  Below the 50% of RAM recommendation.
> > 
> > Well, but the biggest image we can write is not 50% of RAM, but 50% of
> > lowmem... 
> 
> No, it is not.  It's been 50% of RAM for a couple of years now. :-)




> > > > PM: thaw of devices complete after 539.577 msecs
> > > > PM: writing image.
> > > > PM: Free swap pages: 194166
> > > > PM: Not enough free swap
> > > > Restarting tasks ...
> > > > 
> > > > Aha, and it is the new default /sys/power/image_size .. setting it to
> > > > 0 lets machine hibernate. I guess the new default is very wrong for
> > > > highmem machine...
> > > 
> > > The old default did the wrong thing for everyone with sufficient swap (it made
> > > the OOM code trigger every time while preparing to create an image), so I think
> > > the new one it's better overall.
> > 
> > OOM? No... image_size of 0 should have written "as small image as
> > possible"; slow, but should not OOM.
> 
> This is not how it works now.  We preallocate memory to create memory pressure,
> so if image_size is 0, we need to preallocate until we run out of pages that
> can be freed, which means OOM.

That's bad, right? Instead of killing 

Anyway, it does not work at all.

root@amd:~# echo 300000000 > /sys/power/image_size
root@amd:~# echo disk > /sys/power/state 
-su: echo: write error: No space left on device

(And dmesg full of failed allocations).

I can write 400M there, and it fails, too.
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ