From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: nigel@tuxonice.net
Cc: Martin Steigerwald <Martin@lichtvoll.de>,
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: Tue, 17 May 2011 01:22:04 +0200 [thread overview]
Message-ID: <201105170122.04402.rjw@sisk.pl> (raw)
In-Reply-To: <4DD19879.5020606@tuxonice.net>
On Monday, May 16, 2011, Nigel Cunningham wrote:
> Hi.
>
> On 15/05/11 19:36, Rafael J. Wysocki wrote:
> > In fact, if drivers allocated their memory from suspend/hibernate notifiers,
> > that would be practically equivalent to setting reserved_size to the total
> > amount of memory reserved by the drivers. However, it may be difficult
> > for drivers to predict how much memory they will need at the time the
> > notifiers are called (they are called before freezing user space).
> >
> > Thus I'm considering a change that will cause device drivers' ->prepare()
> > callbacks to be executed before the preallocation of memory takes place.
> > In that case the drivers may allocate memory from their ->prepare()
> > callbacks _after_ user space has been frozen and that will make more
> > sense overall.
> >
> > For now, however, I think that exposing reserved_size is the right choice.
>
> Sorry for not commenting earlier - too busy with Drupal development and
> only came across this thread by chance (yes, I'm still subscribed to the
> PM list, but haven't been reading it. Hibernation isn't high on my list
> of priorities at the moment because TOI is feature complete and stable.
> I know I'm supposed to be sending you patches, but other things have
> been taking the time that would be used for that).
>
> Anyway...
>
> This sounds to me like a great development. As far as TuxOnIce goes,
> we've had a knob for ages that has allowed the user to specify an amount
> of memory to be kept aside for driver allocations, and we calculate and
> report how much they used in the debugging info sysfs entry. Because
> TuxOnIce works differently to [u]swsusp, this is the only source of
> potential out-of-memory related failures, and the measures just
> mentioned made things much more reliable.
>
> If things went in the direction you're suggesting here, they'd get
> better again. I'm all in favour!
Thanks Nigel!
next prev parent reply other threads:[~2011-05-16 23:21 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-09 22:59 [RFC][PATCH] PM / Hibernate: Add sysfs knob to control size of memory for drivers Rafael J. Wysocki
2011-05-14 22:56 ` Rafael J. Wysocki
2011-05-15 8:51 ` Martin Steigerwald
2011-05-15 8:51 ` Martin Steigerwald
2011-05-15 9:36 ` Rafael J. Wysocki
2011-05-15 9:51 ` Rafael J. Wysocki
2011-05-15 9:51 ` Rafael J. Wysocki
2011-05-16 21:34 ` Nigel Cunningham
2011-05-16 21:34 ` Nigel Cunningham
2011-05-16 23:22 ` Rafael J. Wysocki [this message]
2011-05-16 23:22 ` Rafael J. Wysocki
2011-05-15 9:36 ` Rafael J. Wysocki
2011-05-18 17:27 ` Pavel Machek
2011-05-18 18:09 ` Martin Steigerwald
2011-05-18 18:09 ` Martin Steigerwald
2011-05-18 18:36 ` Pavel Machek
2011-05-18 20:23 ` Rafael J. Wysocki
2011-05-18 20:23 ` Rafael J. Wysocki
2011-05-18 18:36 ` Pavel Machek
2011-05-18 17:27 ` Pavel Machek
2011-05-14 22:56 ` Rafael J. Wysocki
-- strict thread matches above, loose matches on Subject: below --
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=201105170122.04402.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=Martin@lichtvoll.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=nigel@tuxonice.net \
/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.