<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/kernel/power/process.c, branch v2.6.16.6</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v2.6.16.6</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v2.6.16.6'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2006-04-17T20:16:06Z</updated>
<entry>
<title>[PATCH] Fix suspend with traced tasks</title>
<updated>2006-04-17T20:16:06Z</updated>
<author>
<name>Pavel Machek</name>
<email>pavel@suse.cz</email>
</author>
<published>2006-03-31T10:30:06Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=6b2467e45179a336f1e5b70d2b2ae1fe89a00133'/>
<id>urn:sha1:6b2467e45179a336f1e5b70d2b2ae1fe89a00133</id>
<content type='text'>
strace /bin/bash misbehaves after resume; this fixes it.

(akpm: it's scary calling refrigerator() in state TASK_TRACED, but it seems to
do the right thing).

Signed-off-by: Pavel Machek &lt;pavel@suse.cz&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>[PATCH] pm: fix process freezing</title>
<updated>2005-09-05T07:06:17Z</updated>
<author>
<name>Pavel Machek</name>
<email>pavel@ucw.cz</email>
</author>
<published>2005-09-03T22:57:05Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=6161b2ce8116b9a623260ab811e2c035b3fac2e5'/>
<id>urn:sha1:6161b2ce8116b9a623260ab811e2c035b3fac2e5</id>
<content type='text'>
If process freezing fails, some processes are frozen, and rest are left in
"were asked to be frozen" state.  Thats wrong, we should leave it in some
consistent state.

Signed-off-by: Pavel Machek &lt;pavel@suse.cz&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] remove busywait in refrigerator</title>
<updated>2005-09-05T07:06:14Z</updated>
<author>
<name>Pavel Machek</name>
<email>pavel@ucw.cz</email>
</author>
<published>2005-09-03T22:56:53Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2a23b5d1e119fd10e25b8e93464c8d549f5a5c5d'/>
<id>urn:sha1:2a23b5d1e119fd10e25b8e93464c8d549f5a5c5d</id>
<content type='text'>
This should make refrigerator sleep properly, not busywait after the first
schedule() returns.

Signed-off-by: Pavel Machek &lt;pavel@suse.cz&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] pm: clean up process.c</title>
<updated>2005-07-08T01:23:43Z</updated>
<author>
<name>Pavel Machek</name>
<email>pavel@ucw.cz</email>
</author>
<published>2005-07-08T00:56:45Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=1322ad41513f8f9196801f53cc0851df056f3478'/>
<id>urn:sha1:1322ad41513f8f9196801f53cc0851df056f3478</id>
<content type='text'>
freezeable() already tests for TRACED/STOPPED processes, no need to do it
twice.

Signed-off-by: Pavel Machek &lt;pavel@suse.cz&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] Cleanup patch for process freezing</title>
<updated>2005-06-26T00:10:13Z</updated>
<author>
<name>Christoph Lameter</name>
<email>christoph@lameter.com</email>
</author>
<published>2005-06-25T06:13:50Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3e1d1d28d99dabe63c64f7f40f1ca1d646de1f73'/>
<id>urn:sha1:3e1d1d28d99dabe63c64f7f40f1ca1d646de1f73</id>
<content type='text'>
1. Establish a simple API for process freezing defined in linux/include/sched.h:

   frozen(process)		Check for frozen process
   freezing(process)		Check if a process is being frozen
   freeze(process)		Tell a process to freeze (go to refrigerator)
   thaw_process(process)	Restart process
   frozen_process(process)	Process is frozen now

2. Remove all references to PF_FREEZE and PF_FROZEN from all
   kernel sources except sched.h

3. Fix numerous locations where try_to_freeze is manually done by a driver

4. Remove the argument that is no longer necessary from two function calls.

5. Some whitespace cleanup

6. Clear potential race in refrigerator (provides an open window of PF_FREEZE
   cleared before setting PF_FROZEN, recalc_sigpending does not check
   PF_FROZEN).

This patch does not address the problem of freeze_processes() violating the rule
that a task may only modify its own flags by setting PF_FREEZE. This is not clean
in an SMP environment. freeze(process) is therefore not SMP safe!

Signed-off-by: Christoph Lameter &lt;christoph@lameter.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] fix &amp; clean up zombie/dead task handling &amp; preemption</title>
<updated>2004-10-18T16:12:06Z</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@elte.hu</email>
</author>
<published>2004-10-18T16:12:06Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d3069b4dd0767b4e24debdb21b632b2f8dd72474'/>
<id>urn:sha1:d3069b4dd0767b4e24debdb21b632b2f8dd72474</id>
<content type='text'>
This patch fixes all the preempt-after-task-&gt;state-is-TASK_DEAD problems we
had.  Right now, the moment procfs does a down() that sleeps in
proc_pid_flush() [it could] our TASK_DEAD state is zapped and we might be
back to TASK_RUNNING to and we trigger this assert:

        schedule();
        BUG();
        /* Avoid "noreturn function does return".  */
        for (;;) ;

I have split out TASK_ZOMBIE and TASK_DEAD into a separate p-&gt;exit_state
field, to allow the detaching of exit-signal/parent/wait-handling from
descheduling a dead task.  Dead-task freeing is done via PF_DEAD.

Tested the patch on x86 SMP and UP, but all architectures should work
fine.

Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] cleanup ptrace stops and remove notify_parent</title>
<updated>2004-09-08T00:48:58Z</updated>
<author>
<name>Roland McGrath</name>
<email>roland@redhat.com</email>
</author>
<published>2004-09-08T00:48:58Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=cece79ae3a396b6c311a20380904be376c1d9273'/>
<id>urn:sha1:cece79ae3a396b6c311a20380904be376c1d9273</id>
<content type='text'>
This adds a new state TASK_TRACED that is used in place of TASK_STOPPED
when a thread stops because it is ptraced.  Now ptrace operations are only
permitted when the target is in TASK_TRACED state, not in TASK_STOPPED. 
This means that if a process is stopped normally by a job control signal
and then you PTRACE_ATTACH to it, you will have to send it a SIGCONT before
you can do any ptrace operations on it.  (The SIGCONT will be reported to
ptrace and then you can discard it instead of passing it through when you
call PTRACE_CONT et al.)

If a traced child gets orphaned while in TASK_TRACED state, it morphs into
TASK_STOPPED state.  This makes it again possible to resume or destroy the
process with SIGCONT or SIGKILL.

All non-signal tracing stops should now be done via ptrace_notify.  I've
updated the syscall tracing code in several architectures to do this
instead of replicating the work by hand.  I also fixed several that were
unnecessarily repeating some of the checks in ptrace_check_attach.  Calling
ptrace_check_attach alone is sufficient, and the old checks repeated before
are now incorrect, not just superfluous.

I've closed a race in ptrace_check_attach.  With this, we should have a
robust guarantee that when ptrace starts operating, the task will be in
TASK_TRACED state and won't come out of it.  This is because the only way
to resume from TASK_TRACED is via ptrace operations, and only the one
parent thread attached as the tracer can do those.

This patch also cleans up the do_notify_parent and do_notify_parent_cldstop
code so that the dead and stopped cases are completely disjoint.  The
notify_parent function is gone.

Signed-off-by: Roland McGrath &lt;roland@redhat.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] Prepare for SMP suspend</title>
<updated>2004-06-24T02:23:48Z</updated>
<author>
<name>Andrew Morton</name>
<email>akpm@osdl.org</email>
</author>
<published>2004-06-24T02:23:48Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=97b6dbb209b4bfb029823a4d7fb46eea3ec22574'/>
<id>urn:sha1:97b6dbb209b4bfb029823a4d7fb46eea3ec22574</id>
<content type='text'>
From: Pavel Machek &lt;pavel@ucw.cz&gt;

Its very bad idea to freeze migration threads, as it crashes machine upon
next call to "schedule()".  In refrigerator, I had one "wake_up_process()"
too many.  This fixes it.

Signed-off-by: Pavel Machek &lt;pavel@suse.cz&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[PATCH] swsusp: kill unneccessary debugging</title>
<updated>2004-05-22T03:38:51Z</updated>
<author>
<name>Andrew Morton</name>
<email>akpm@osdl.org</email>
</author>
<published>2004-05-22T03:38:51Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a7f8c55feb894410ae534fde1d8bab38fb928f22'/>
<id>urn:sha1:a7f8c55feb894410ae534fde1d8bab38fb928f22</id>
<content type='text'>
From: Pavel Machek &lt;pavel@ucw.cz&gt;

This is no longer neccessary.  We have enough pauses elsewhere, and it works
well enough that this is not needed.
</content>
</entry>
<entry>
<title>[PATCH] Rename PF_IOTHREAD to PF_NOFREEZE</title>
<updated>2004-04-19T05:05:17Z</updated>
<author>
<name>Andrew Morton</name>
<email>akpm@osdl.org</email>
</author>
<published>2004-04-19T05:05:17Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ef29bf03ef66e8c00f2917668ffb0c15e75bce8b'/>
<id>urn:sha1:ef29bf03ef66e8c00f2917668ffb0c15e75bce8b</id>
<content type='text'>
From: Nigel Cunningham &lt;ncunningham@users.sourceforge.net&gt;

A few weeks ago, Pavel and I agreed that PF_IOTHREAD should be renamed to
PF_NOFREEZE.  This reflects the fact that some threads so marked aren't
actually used for IO while suspending, but simply shouldn't be frozen.
This patch, against 2.6.5 vanilla, applies that change.  In the
refrigerator calls, the actual value doesn't matter (so long as it's
non-zero) and it makes more sense to use PF_FREEZE so I've used that.
</content>
</entry>
</feed>
