All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Martin Steigerwald <Martin@lichtvoll.de>
Cc: linux-kernel@vger.kernel.org,
	Linux PM mailing list <linux-pm@lists.linux-foundation.org>
Subject: Re: does hibernate to disk try hard enough to free memory?
Date: Sun, 6 Mar 2011 00:28:02 +0100	[thread overview]
Message-ID: <201103060028.02477.rjw@sisk.pl> (raw)
In-Reply-To: <201103051541.45511.Martin@lichtvoll.de>

On Saturday, March 05, 2011, Martin Steigerwald wrote:
> Am Wednesday 23 February 2011 schrieb Rafael J. Wysocki:
> > 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.
> 
> Reported-as:
> 
> Bug 30482 - try harder to free enough memory / improve image size 
> autotuning

I attached a patch for you to test to the bug entry.

Thanks,
Rafael

  reply	other threads:[~2011-03-05 23:28 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-22 20:59 does hibernate to disk try hard enough to free memory? Martin Steigerwald
2011-02-22 20:59 ` Martin Steigerwald
2011-02-22 21:09 ` Rafael J. Wysocki
2011-02-22 21:09 ` Rafael J. Wysocki
2011-02-22 22:07   ` Martin Steigerwald
2011-02-22 22:32     ` Rafael J. Wysocki
2011-02-23 14:10       ` Martin Steigerwald
2011-02-23 20:06         ` Rafael J. Wysocki
2011-02-23 20:06         ` Rafael J. Wysocki
2011-03-05 14:41           ` Martin Steigerwald
2011-03-05 23:28             ` Rafael J. Wysocki [this message]
2011-03-05 23:28             ` Rafael J. Wysocki
2011-03-05 14:41           ` Martin Steigerwald
2011-02-23 14:10       ` Martin Steigerwald
2011-02-22 22:32     ` Rafael J. Wysocki
2011-02-22 22:07   ` Martin Steigerwald

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201103060028.02477.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=Martin@lichtvoll.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.