<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/power/process.c, branch v2.6.27.23</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/kernel/power/process.c?h=v2.6.27.23</id>
<link rel='self' href='https://git.amat.us/linux/atom/kernel/power/process.c?h=v2.6.27.23'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2008-07-24T17:47:24Z</updated>
<entry>
<title>pm: fix try_to_freeze_tasks()'s use of do_div()</title>
<updated>2008-07-24T17:47:24Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2008-07-24T04:28:44Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f0af566da6e9a4a2f5a83c5a70f3d0a772050e21'/>
<id>urn:sha1:f0af566da6e9a4a2f5a83c5a70f3d0a772050e21</id>
<content type='text'>
Fix try_to_freeze_tasks()'s use of do_div() on an s64 by making
elapsed_csecs64 a u64 instead and dividing that.

Possibly this should be guarded lest the interval calculation turn up
negative, but the possible negativity of the result of the division is
cast away anyway.

This was introduced by patch 438e2ce68dfd4af4cfcec2f873564fb921db4bb5.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Acked-by: "Rafael J. Wysocki" &lt;rjw@sisk.pl&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Freezer: Introduce PF_FREEZER_NOSIG</title>
<updated>2008-07-16T21:27:03Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2008-06-11T20:04:29Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ebb12db51f6c13b30752fcf506baad4c617b153c'/>
<id>urn:sha1:ebb12db51f6c13b30752fcf506baad4c617b153c</id>
<content type='text'>
The freezer currently attempts to distinguish kernel threads from
user space tasks by checking if their mm pointer is unset and it
does not send fake signals to kernel threads.  However, there are
kernel threads, mostly related to networking, that behave like
user space tasks and may want to be sent a fake signal to be frozen.

Introduce the new process flag PF_FREEZER_NOSIG that will be set
by default for all kernel threads and make the freezer only send
fake signals to the tasks having PF_FREEZER_NOSIG unset.  Provide
the set_freezable_with_signal() function to be called by the kernel
threads that want to be sent a fake signal for freezing.

This patch should not change the freezer's observable behavior.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Signed-off-by: Andi Kleen &lt;ak@linux.intel.com&gt;
Acked-by: Pavel Machek &lt;pavel@suse.cz&gt;
Signed-off-by: Len Brown &lt;len.brown@intel.com&gt;
</content>
</entry>
<entry>
<title>freezer vs stopped or traced</title>
<updated>2008-03-04T15:59:54Z</updated>
<author>
<name>Roland McGrath</name>
<email>roland@redhat.com</email>
</author>
<published>2008-03-04T04:22:05Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=13b1c3d4b49bd83d861c775ca2db54e1692a1b07'/>
<id>urn:sha1:13b1c3d4b49bd83d861c775ca2db54e1692a1b07</id>
<content type='text'>
This changes the "freezer" code used by suspend/hibernate in its treatment
of tasks in TASK_STOPPED (job control stop) and TASK_TRACED (ptrace) states.

As I understand it, the intent of the "freezer" is to hold all tasks
from doing anything significant.  For this purpose, TASK_STOPPED and
TASK_TRACED are "frozen enough".  It's possible the tasks might resume
from ptrace calls (if the tracer were unfrozen) or from signals
(including ones that could come via timer interrupts, etc).  But this
doesn't matter as long as they quickly block again while "freezing" is
in effect.  Some minor adjustments to the signal.c code make sure that
try_to_freeze() very shortly follows all wakeups from both kinds of
stop.  This lets the freezer code safely leave stopped tasks unmolested.

Changing this fixes the longstanding bug of seeing after resuming from
suspend/hibernate your shell report "[1] Stopped" and the like for all
your jobs stopped by ^Z et al, as if you had freshly fg'd and ^Z'd them.
It also removes from the freezer the arcane special case treatment for
ptrace'd tasks, which relied on intimate knowledge of ptrace internals.

Signed-off-by: Roland McGrath &lt;roland@redhat.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>power: Use task_is_*</title>
<updated>2007-12-06T22:34:47Z</updated>
<author>
<name>Matthew Wilcox</name>
<email>matthew@wil.cx</email>
</author>
<published>2007-12-06T16:06:01Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d2f60e5faa9aef9a08d0abaee2007e5a0800d2c5'/>
<id>urn:sha1:d2f60e5faa9aef9a08d0abaee2007e5a0800d2c5</id>
<content type='text'>
Signed-off-by: Matthew Wilcox &lt;willy@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>freezer: measure freezing time</title>
<updated>2007-10-18T21:37:19Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2007-10-18T10:04:49Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=438e2ce68dfd4af4cfcec2f873564fb921db4bb5'/>
<id>urn:sha1:438e2ce68dfd4af4cfcec2f873564fb921db4bb5</id>
<content type='text'>
Measure the time of the freezing of tasks, even if it doesn't fail.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>freezer: be more verbose</title>
<updated>2007-10-18T21:37:19Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2007-10-18T10:04:48Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b842ee578eeb2c10303725e28edca130ede0397c'/>
<id>urn:sha1:b842ee578eeb2c10303725e28edca130ede0397c</id>
<content type='text'>
Increase the freezer's verbosity a bit, so that it's easier to read problem
reports related to it.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Acked-by: Nigel Cunningham &lt;nigel@nigel.suspend2.net&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>freezer: do not send signals to kernel threads</title>
<updated>2007-10-18T21:37:19Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2007-10-18T10:04:46Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d5d8c5976d6adeddb8208c240460411e2198b393'/>
<id>urn:sha1:d5d8c5976d6adeddb8208c240460411e2198b393</id>
<content type='text'>
The freezer should not send signals to kernel threads, since that may lead to
subtle problems.  In particular, commit
b74d0deb968e1f85942f17080eace015ce3c332c has changed recalc_sigpending_tsk()
so that it doesn't clear TIF_SIGPENDING.  For this reason, if the freezer
continues to send fake signals to kernel threads and the freezing of kernel
threads fails, some of them may be running with TIF_SIGPENDING set forever.

Accordingly, recalc_sigpending_tsk() shouldn't set the task's TIF_SIGPENDING
flag if TIF_FREEZE is set.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Cc: Nigel Cunningham &lt;nigel@nigel.suspend2.net&gt;
Cc: Pavel Machek &lt;pavel@ucw.cz&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>freezer: do not sync filesystems from freeze_processes</title>
<updated>2007-10-18T21:37:18Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2007-10-18T10:04:44Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=232b14328050a4639130b0dec185f43968e72035'/>
<id>urn:sha1:232b14328050a4639130b0dec185f43968e72035</id>
<content type='text'>
The syncing of filesystems from within the freezer is generally not needed.
Also, if there's an ext3 filesystem loopback-mounted from a FUSE one, the
syncing results in writes to it and deadlocks.  Similarly, it will deadlock if
FUSE implements sync.

Change freeze_processes() so that it doesn't execute sys_sync() and make the
suspend and hibernation code path sync filesystems independently of the
freezer.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Cc: Nigel Cunningham &lt;nigel@nigel.suspend2.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Freezer: remove redundant check in try_to_freeze_tasks</title>
<updated>2007-07-19T17:04:42Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2007-07-19T08:47:35Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c2cf7d87d804c66e063829d5ca739053e901dc15'/>
<id>urn:sha1:c2cf7d87d804c66e063829d5ca739053e901dc15</id>
<content type='text'>
We don't need to check if todo is positive before calling time_after() in
try_to_freeze_tasks(), because if todo is zero at this point, the loop will be
broken anyway due to the while () condition being false.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Cc: Gautham R Shenoy &lt;ego@in.ibm.com&gt;
Cc: Oleg Nesterov &lt;oleg@tv-sign.ru&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Freezer: return int from freeze_processes</title>
<updated>2007-07-19T17:04:42Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2007-07-19T08:47:34Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e7cd8a722745a01bcfac4d4a52d53391d177da20'/>
<id>urn:sha1:e7cd8a722745a01bcfac4d4a52d53391d177da20</id>
<content type='text'>
Make try_to_freeze_tasks() and freeze_processes() return -EBUSY on failure
instead of the number of unfrozen tasks (none of the callers actually uses
this number).

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Cc: Gautham R Shenoy &lt;ego@in.ibm.com&gt;
Cc: Oleg Nesterov &lt;oleg@tv-sign.ru&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
