From: Martin Steigerwald <Martin@lichtvoll.de>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Linux PM mailing list <linux-pm@lists.linux-foundation.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [RFC][PATCH] PM / Hibernate: Add sysfs knob to control size of memory for drivers
Date: Sun, 15 May 2011 10:51:32 +0200 [thread overview]
Message-ID: <201105151051.38934.Martin@lichtvoll.de> (raw)
In-Reply-To: <201105150056.55601.rjw@sisk.pl>
[-- Attachment #1.1: Type: Text/Plain, Size: 2868 bytes --]
Am Sonntag, 15. Mai 2011 schrieb Rafael J. Wysocki:
> Hi,
Hi Rafael,
> On Tuesday, May 10, 2011, Rafael J. Wysocki wrote:
> > From: Rafael J. Wysocki <rjw@sisk.pl>
> >
> > Martin reports that on his system hibernation occasionally fails due
> > to the lack of memory, because the radeon driver apparently allocates
> > too much of it during the device freeze stage. It turns out that the
> > amount of memory allocated by radeon during hibernation (and
> > presumably during system suspend too) depends on the utilization of
> > the GPU (e.g. hibernating while there are two KDE 4 sessions with
> > compositing enabled causes radeon to allocate more memory than for
> > one KDE 4 session).
> >
> > In principle it should be possible to use image_size to make the
> > memory preallocation mechanism free enough memory for the radeon
> > driver, but in practice it is not easy to guess the right value
> > because of the way the preallocation code uses image_size. For this
> > reason, it seems reasonable to allow users to control the amount of
> > memory reserved for driver allocations made after the preallocation,
> > which currently is constant and amounts to 1 MB.
> >
> > Introduce a new sysfs file, /sys/power/reserved_size, whose value
> > will be used as the amount of memory to reserve for the
> > post-preallocation reservations made by device drivers, in bytes.
> > For backwards compatibility, set its default (and initial) value to
> > the currently used number (1 MB).
> >
> > References: https://bugzilla.kernel.org/show_bug.cgi?id=34102
> > Reported-by: Martin Steigerwald <Martin@Lichtvoll.de>
> > Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
>
> OK, there are no comments, so my understanding is that everyone is fine
> with this patch and I can add it to my linux-next branch.
Extensively
Tested-by: Martin Steigerwald <Martin@Lichtvoll.de>
This patch makes a complete difference for me. Instead of not knowing
whether my ThinkPad T42 will hibernate with lots of applications open and
thus closing applications prior to hibernation preventively now it simply
will. *Always*.
I even tested it with two KDE 4 sessions with running desktop search
indexing on one. It took ages, cause KDE 4.6 desktop search / nepomuk stuff
seems to I/O load the machine beyond anything (bugs reported there), but
it worked.
16 MiB reserved_size has been enough for one KDE session. With 128 MiB the
linux kernel hibernated two KDE sessions.
Drivers allocating their memory via suspend/hibernate notifiers according
to Rafael should fix the root cause, but until that is done, this will do.
Adjusting imagesize instead never gave me such a reliable result.
Thanks,
--
Martin 'Helios' Steigerwald - http://www.Lichtvoll.de
GPG: 03B0 0D6C 0040 0710 4AFA B82F 991B EAAC A599 84C7
[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
next prev parent reply other threads:[~2011-05-15 8:51 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <201105100059.25372.rjw@sisk.pl>
2011-05-14 22:56 ` [RFC][PATCH] PM / Hibernate: Add sysfs knob to control size of memory for drivers Rafael J. Wysocki
[not found] ` <201105150056.55601.rjw@sisk.pl>
2011-05-15 8:51 ` Martin Steigerwald [this message]
2011-05-15 9:36 ` Rafael J. Wysocki
[not found] ` <201105151136.22169.rjw@sisk.pl>
2011-05-15 9:51 ` Rafael J. Wysocki
2011-05-16 21:34 ` Nigel Cunningham
2011-05-16 23:22 ` Rafael J. Wysocki
2011-05-18 17:27 ` Pavel Machek
[not found] ` <20110518172717.GA5734@elf.ucw.cz>
2011-05-18 18:09 ` Martin Steigerwald
[not found] ` <201105182009.55813.Martin@lichtvoll.de>
2011-05-18 18:36 ` Pavel Machek
[not found] ` <20110518183638.GA8887@elf.ucw.cz>
2011-05-18 20:23 ` Rafael J. Wysocki
2011-05-09 22:59 Rafael J. Wysocki
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=201105151051.38934.Martin@lichtvoll.de \
--to=martin@lichtvoll.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=rjw@sisk.pl \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox