From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: pm list <linux-pm@lists.linux-foundation.org>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>,
Miklos Szeredi <miklos@szeredi.hu>, Pavel Machek <pavel@ucw.cz>,
Oleg Nesterov <oleg@tv-sign.ru>
Subject: [RFC][PATCH -mm 6/6] Freezer: Document relationship with memory shrinking
Date: Mon, 9 Jul 2007 22:41:28 +0200 [thread overview]
Message-ID: <200707092241.29029.rjw@sisk.pl> (raw)
In-Reply-To: <200707092229.08898.rjw@sisk.pl>
From: Rafael J. Wysocki <rjw@sisk.pl>
One important reason to freeze tasks, which is that we don't want them to
allocate memory after freeing it for the hibernation image, has not been
documented. Fix it.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---
Documentation/power/freezing-of-tasks.txt | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
Index: linux-2.6.22-rc7/Documentation/power/freezing-of-tasks.txt
===================================================================
--- linux-2.6.22-rc7.orig/Documentation/power/freezing-of-tasks.txt
+++ linux-2.6.22-rc7/Documentation/power/freezing-of-tasks.txt
@@ -88,7 +88,16 @@ hibernation image has been created and b
The majority of these are user space processes, but if any of the kernel threads
may cause something like this to happen, they have to be freezable.
-2. The second reason is to prevent user space processes and some kernel threads
+2. Next, to create the hibernation image we need to free a sufficient amount of
+memory (approximately 50% of available RAM) and we need to do that before
+devices are deactivated, because we generally need them for swapping out. Then,
+after the memory for the image has been freed, we don't want tasks to allocate
+additional memory and we prevent them from doing that by freezing them earlier.
+[Of course, this also means that device drivers should not allocate substantial
+amounts of memory from their .suspend() callbacks before hibernation, but this
+is e separate issue.]
+
+3. The third reason is to prevent user space processes and some kernel threads
from interfering with the suspending and resuming of devices. A user space
process running on a second CPU while we are suspending devices may, for
example, be troublesome and without the freezing of tasks we would need some
@@ -118,7 +127,7 @@ frozen before the driver's .suspend() ca
thawed after the driver's .resume() callback has run, so it won't be accessing
the device while it's suspended.
-3. Another reason for freezing tasks is to prevent user space processes from
+4. Another reason for freezing tasks is to prevent user space processes from
realizing that hibernation (or suspend) operation takes place. Ideally, user
space processes should not notice that such a system-wide operation has occurred
and should continue running without any problems after the restore (or resume
next prev parent reply other threads:[~2007-07-09 20:41 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-09 20:29 [RFC][PATCH -mm 0/6] Freezer update Rafael J. Wysocki
2007-07-09 20:31 ` [RFC][PATCH -mm 1/6] Freezer: Do not sync filesystems Rafael J. Wysocki
2007-07-09 23:12 ` Pavel Machek
2007-07-10 0:31 ` Matthew Garrett
2007-07-09 20:32 ` [RFC][PATCH -mm 2/6] Freezer: Do not send signals to kernel threads Rafael J. Wysocki
2007-07-09 23:42 ` Pavel Machek
2007-07-10 5:57 ` Rafael J. Wysocki
2007-07-10 15:00 ` Oleg Nesterov
2007-07-10 21:08 ` Rafael J. Wysocki
2007-07-10 21:22 ` Oleg Nesterov
2007-07-09 20:33 ` [RFC][PATCH -mm 3/6] Freezer: Be more verbose Rafael J. Wysocki
2007-07-09 23:46 ` Pavel Machek
2007-07-10 6:01 ` Rafael J. Wysocki
2007-07-10 15:05 ` Pavel Machek
2007-07-09 20:34 ` [RFC][PATCH -mm 4/6] Freezer: Prevent new tasks from inheriting TIF_FREEZE set Rafael J. Wysocki
2007-07-09 23:21 ` Pavel Machek
2007-07-10 6:03 ` Rafael J. Wysocki
2007-07-10 15:05 ` Pavel Machek
2007-07-09 20:38 ` [RFC][PATCH -mm 5/6] Freezer: Use freezing timeout more efficiently Rafael J. Wysocki
2007-07-09 23:34 ` Pavel Machek
2007-07-10 6:09 ` Rafael J. Wysocki
2007-07-10 10:04 ` Rafael J. Wysocki
2007-07-10 17:17 ` Oleg Nesterov
2007-07-10 20:30 ` Rafael J. Wysocki
2007-07-10 20:55 ` Oleg Nesterov
2007-07-10 21:15 ` Rafael J. Wysocki
2007-07-10 18:50 ` Oleg Nesterov
2007-07-10 19:54 ` Rafael J. Wysocki
2007-07-10 20:35 ` Oleg Nesterov
2007-07-10 20:57 ` Rafael J. Wysocki
2007-07-10 21:13 ` bogosort (was Re: Re: [RFC][PATCH -mm 5/6] Freezer: Use freezing timeout more efficiently) Pavel Machek
2007-07-10 21:38 ` Oleg Nesterov
2007-07-10 21:39 ` Rafael J. Wysocki
2007-07-10 21:39 ` Pavel Machek
2007-07-10 22:07 ` Rafael J. Wysocki
2007-07-10 22:21 ` Pavel Machek
2007-07-23 8:04 ` Pavel Machek
2007-07-23 19:16 ` Rafael J. Wysocki
2007-07-09 20:41 ` Rafael J. Wysocki [this message]
2007-07-09 23:23 ` [RFC][PATCH -mm 6/6] Freezer: Document relationship with memory shrinking Pavel Machek
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=200707092241.29029.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=linux-pm@lists.linux-foundation.org \
--cc=miklos@szeredi.hu \
--cc=mjg59@srcf.ucam.org \
--cc=oleg@tv-sign.ru \
--cc=pavel@ucw.cz \
/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