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, 23 Feb 2011 21:06:51 +0100
From:	"Rafael J. Wysocki" <rjw@...k.pl>
To:	Martin Steigerwald <Martin@...htvoll.de>
Cc:	Linux PM mailing list <linux-pm@...ts.linux-foundation.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: does hibernate to disk try hard enough to free memory?

On Wednesday, February 23, 2011, Martin Steigerwald wrote:
> Am Tuesday 22 February 2011 schrieb Rafael J. Wysocki:
> > On Tuesday, February 22, 2011, Martin Steigerwald wrote:
> > > Am Tuesday 22 February 2011 schrieb Rafael J. Wysocki:
> > > > On Tuesday, February 22, 2011, Martin Steigerwald wrote:
> > > > > Hi!
> > > > > 
> > > > > Since Radeon KMS I often have it that my ThinkPad T42 with 2 MiB
> > > > > of RAM is not able to allocate memory for the hibernation image.
> > > > > Before KMS hibernation only very rarely failed for that reason.
> > > > > 
> > > > > Often I run without compositing at all as I believe this might
> > > > > spare some pages as well. But this doesn't always help.
> > > > > 
> > > > > It complains that to less pages could be freed. For example with
> > > > > kernel 2.6.37:
> > > > > 
> > > > > Feb 16 00:15:00 shambhala kernel: PM: Creating hibernation image:
> > > > > Feb 16 00:15:00 shambhala kernel: PM: Need to copy 186577 pages
> > > > > Feb 16 00:15:00 shambhala kernel: PM: Normal pages needed: 114411
> > > > > + 1024, available pages: 112767
> > > > > Feb 16 00:15:00 shambhala kernel: PM: Not enough free memory
> > > > > Feb 16 00:15:00 shambhala kernel: PM: Error -12 creating
> > > > > hibernation image Feb 16 00:15:00 shambhala kernel: Extended
> > > > > CMOS year: 2000 Feb 16 00:15:00 shambhala kernel: ACPI: Waking
> > > > > up from system sleep state S4
> > > > > Feb 16 00:15:00 shambhala kernel: PM: early recover of devices
> > > > > complete after 0.376 msecs
> > > > 
> > > > What's the value in /sys/power/image_size?
> > > 
> > > shambhala:~> cat /sys/power/image_size
> > > 844206080
> > > 
> > > Should I try with less?
> > 
> > Yes, please.  Try with 700000000 for example.
> 
> I replaced dropping by settings image_size to this valua and the ThinkPad 
> hibernated with KMail open. Thus seems to work, but I will test a bit 
> further.
> 
> Where does the higher value previously set come from? Autotuning?

Likely.  The number seems to match at least.

> Is there anything that can be improved with autotuning?

We can lower the ratio of the image size to the total RAM.
Alternatively, we can increase SPARE_PAGES.

> If yes, I can file a bug report.

Yes, please.

> Otherwise I just try to find a good value for image size and be 
> done with it.

It would be helpful if you could determine the greatest image size working
for you.

Thanks,
Rafael
--
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