<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/kthread.c, branch v2.6.37</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v2.6.37</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v2.6.37'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2010-12-22T09:27:53Z</updated>
<entry>
<title>kthread_work: make lockdep happy</title>
<updated>2010-12-22T09:27:53Z</updated>
<author>
<name>Yong Zhang</name>
<email>yong.zhang0@gmail.com</email>
</author>
<published>2010-12-22T09:27:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4f32e9b1f812fd6c00cc85a127583fefbdedaedc'/>
<id>urn:sha1:4f32e9b1f812fd6c00cc85a127583fefbdedaedc</id>
<content type='text'>
spinlock in kthread_worker and wait_queue_head in kthread_work both
should be lockdep sensible, so change the interface to make it
suiltable for CONFIG_LOCKDEP.

tj: comment update

Reported-by: Nicolas &lt;nicolas.mailhot@laposte.net&gt;
Signed-off-by: Yong Zhang &lt;yong.zhang0@gmail.com&gt;
Signed-off-by: Andy Walls &lt;awalls@md.metrocast.net&gt;
Tested-by: Andy Walls &lt;awalls@md.metrocast.net&gt;
Cc: Tejun Heo &lt;tj@kernel.org&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
</content>
</entry>
<entry>
<title>kthread: implement kthread_data()</title>
<updated>2010-06-29T08:07:09Z</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2010-06-29T08:07:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=82805ab77d25643f579d90397dcd34f05d1b750a'/>
<id>urn:sha1:82805ab77d25643f579d90397dcd34f05d1b750a</id>
<content type='text'>
Implement kthread_data() which takes @task pointing to a kthread and
returns @data specified when creating the kthread.  The caller is
responsible for ensuring the validity of @task when calling this
function.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
</content>
</entry>
<entry>
<title>kthread: implement kthread_worker</title>
<updated>2010-06-29T08:07:09Z</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2010-06-29T08:07:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b56c0d8937e665a27d90517ee7a746d0aa05af46'/>
<id>urn:sha1:b56c0d8937e665a27d90517ee7a746d0aa05af46</id>
<content type='text'>
Implement simple work processor for kthread.  This is to ease using
kthread.  Single thread workqueue used to be used for things like this
but workqueue won't guarantee fixed kthread association anymore to
enable worker sharing.

This can be used in cases where specific kthread association is
necessary, for example, when it should have RT priority or be assigned
to certain cgroup.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>cpuset: fix the problem that cpuset_mem_spread_node() returns an offline node</title>
<updated>2010-03-24T23:31:21Z</updated>
<author>
<name>Miao Xie</name>
<email>miaox@cn.fujitsu.com</email>
</author>
<published>2010-03-23T20:35:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5ab116c9349ef52d6fbd2e2917a53f13194b048e'/>
<id>urn:sha1:5ab116c9349ef52d6fbd2e2917a53f13194b048e</id>
<content type='text'>
cpuset_mem_spread_node() returns an offline node, and causes an oops.

This patch fixes it by initializing task-&gt;mems_allowed to
node_states[N_HIGH_MEMORY], and updating task-&gt;mems_allowed when doing
memory hotplug.

Signed-off-by: Miao Xie &lt;miaox@cn.fujitsu.com&gt;
Acked-by: David Rientjes &lt;rientjes@google.com&gt;
Reported-by: Nick Piggin &lt;npiggin@suse.de&gt;
Tested-by: Nick Piggin &lt;npiggin@suse.de&gt;
Cc: Paul Menage &lt;menage@google.com&gt;
Cc: Li Zefan &lt;lizf@cn.fujitsu.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: &lt;stable@kernel.org&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>kthread, sched: Remove reference to kthread_create_on_cpu</title>
<updated>2010-02-09T10:47:39Z</updated>
<author>
<name>Anton Blanchard</name>
<email>anton@samba.org</email>
</author>
<published>2010-02-09T04:07:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=301ba0457f1ed853fc08e57785f8c87fe7e49c68'/>
<id>urn:sha1:301ba0457f1ed853fc08e57785f8c87fe7e49c68</id>
<content type='text'>
kthread_create_on_cpu doesn't exist so update a comment in
kthread.c to reflect this.

Signed-off-by: Anton Blanchard &lt;anton@samba.org&gt;
Acked-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
LKML-Reference: &lt;20100209040740.GB3702@kryten&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>sched: Move kthread_bind() back to kthread.c</title>
<updated>2009-12-16T18:01:57Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>a.p.zijlstra@chello.nl</email>
</author>
<published>2009-12-16T17:04:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=881232b70b195768a71cd74ff4b4e8ab9502997b'/>
<id>urn:sha1:881232b70b195768a71cd74ff4b4e8ab9502997b</id>
<content type='text'>
Since kthread_bind() lost its dependencies on sched.c, move it
back where it came from.

Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Mike Galbraith &lt;efault@gmx.de&gt;
LKML-Reference: &lt;20091216170518.039524041@chello.nl&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>sched: Fix kthread_bind() by moving the body of kthread_bind() to sched.c</title>
<updated>2009-11-03T06:25:00Z</updated>
<author>
<name>Mike Galbraith</name>
<email>efault@gmx.de</email>
</author>
<published>2009-10-29T10:48:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b84ff7d6f1b7f8a43414e74d972ec4c8f3361db4'/>
<id>urn:sha1:b84ff7d6f1b7f8a43414e74d972ec4c8f3361db4</id>
<content type='text'>
Eric Paris reported that commit
f685ceacab07d3f6c236f04803e2f2f0dbcc5afb causes boot time
PREEMPT_DEBUG complaints.

 [    4.590699] BUG: using smp_processor_id() in preemptible [00000000] code: rmmod/1314
 [    4.593043] caller is task_hot+0x86/0xd0

Since kthread_bind() messes with scheduler internals, move the
body to sched.c, and lock the runqueue.

Reported-by: Eric Paris &lt;eparis@redhat.com&gt;
Signed-off-by: Mike Galbraith &lt;efault@gmx.de&gt;
Tested-by: Eric Paris &lt;eparis@redhat.com&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
LKML-Reference: &lt;1256813310.7574.3.camel@marge.simson.net&gt;
[ v2: fix !SMP build and clean up ]
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>sched: Keep kthreads at default priority</title>
<updated>2009-09-09T15:30:06Z</updated>
<author>
<name>Mike Galbraith</name>
<email>efault@gmx.de</email>
</author>
<published>2009-09-09T13:41:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=61cbe54d9479ad98283b2dda686deae4c34b2d59'/>
<id>urn:sha1:61cbe54d9479ad98283b2dda686deae4c34b2d59</id>
<content type='text'>
Removes kthread/workqueue priority boost, they increase worst-case
desktop latencies.

Signed-off-by: Mike Galbraith &lt;efault@gmx.de&gt;
Acked-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
LKML-Reference: &lt;1252486344.28645.18.camel@marge.simson.net&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>update the comment in kthread_stop()</title>
<updated>2009-07-27T19:15:46Z</updated>
<author>
<name>Oleg Nesterov</name>
<email>oleg@redhat.com</email>
</author>
<published>2009-06-19T00:51:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9ae260270c90643156cda73427aa1f04c923e627'/>
<id>urn:sha1:9ae260270c90643156cda73427aa1f04c923e627</id>
<content type='text'>
Commit 63706172f332fd3f6e7458ebfb35fa6de9c21dc5 ("kthreads: rework
kthread_stop()") removed the limitation that the thread function mysr
not call do_exit() itself, but forgot to update the comment.

Since that commit it is OK to use kthread_stop() even if kthread can
exit itself.

Signed-off-by: Oleg Nesterov &lt;oleg@redhat.com&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>kthreads: rework kthread_stop()</title>
<updated>2009-06-18T20:03:54Z</updated>
<author>
<name>Oleg Nesterov</name>
<email>oleg@redhat.com</email>
</author>
<published>2009-06-17T23:27:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=63706172f332fd3f6e7458ebfb35fa6de9c21dc5'/>
<id>urn:sha1:63706172f332fd3f6e7458ebfb35fa6de9c21dc5</id>
<content type='text'>
Based on Eric's patch which in turn was based on my patch.

kthread_stop() has the nasty problems:

- it runs unpredictably long with the global semaphore held.

- it deadlocks if kthread itself does kthread_stop() before it obeys
  the kthread_should_stop() request.

- it is not useable if kthread exits on its own, see for example the
  ugly "wait_to_die:" hack in migration_thread()

- it is not possible to just tell kthread it should stop, we must always
  wait for its exit.

With this patch kthread() allocates all neccesary data (struct kthread) on
its own stack, globals kthread_stop_xxx are deleted.  -&gt;vfork_done is used
as a pointer into "struct kthread", this means kthread_stop() can easily
wait for kthread's exit.

Signed-off-by: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Pavel Emelyanov &lt;xemul@openvz.org&gt;
Cc: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Cc: Vitaliy Gusev &lt;vgusev@openvz.org
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>
