<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/kthread.c, branch v2.6.30</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.30</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v2.6.30'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2009-04-09T00:20:37Z</updated>
<entry>
<title>kthread: move sched-realeted initialization from kthreadd context</title>
<updated>2009-04-09T00:20:37Z</updated>
<author>
<name>Oleg Nesterov</name>
<email>oleg@redhat.com</email>
</author>
<published>2009-04-09T15:50:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1c99315bb36b5d776210546d438ca928dc9b1f22'/>
<id>urn:sha1:1c99315bb36b5d776210546d438ca928dc9b1f22</id>
<content type='text'>
kthreadd is the single thread which implements ths "create" request, move
sched_setscheduler/etc from create_kthread() to kthread_create() to
improve the scalability.

We should be careful with sched_setscheduler(), use _nochek helper.

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: Vitaliy Gusev &lt;vgusev@openvz.org
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
</content>
</entry>
<entry>
<title>kthread: Don't looking for a task in create_kthread() #2</title>
<updated>2009-04-09T00:20:36Z</updated>
<author>
<name>Vitaliy Gusev</name>
<email>vgusev@openvz.org</email>
</author>
<published>2009-04-09T15:50:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3217ab97f14c5c8f9f975ed8c40c351164b0b10e'/>
<id>urn:sha1:3217ab97f14c5c8f9f975ed8c40c351164b0b10e</id>
<content type='text'>
Remove the unnecessary find_task_by_pid_ns(). kthread() can just
use "current" to get the same result.

Signed-off-by: Vitaliy Gusev &lt;vgusev@openvz.org&gt;
Acked-by: Oleg Nesterov &lt;oleg@redhat.com&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
</content>
</entry>
<entry>
<title>cpumask: remove dangerous CPU_MASK_ALL_PTR, &amp;CPU_MASK_ALL</title>
<updated>2009-03-30T11:35:11Z</updated>
<author>
<name>Rusty Russell</name>
<email>rusty@rustcorp.com.au</email>
</author>
<published>2009-03-31T04:05:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1a2142afa5646ad5af44bbe1febaa5e0b7e71156'/>
<id>urn:sha1:1a2142afa5646ad5af44bbe1febaa5e0b7e71156</id>
<content type='text'>
Impact: cleanup

(Thanks to Al Viro for reminding me of this, via Ingo)

CPU_MASK_ALL is the (deprecated) "all bits set" cpumask, defined as so:

	#define CPU_MASK_ALL (cpumask_t) { { ... } }

Taking the address of such a temporary is questionable at best,
unfortunately 321a8e9d (cpumask: add CPU_MASK_ALL_PTR macro) added
CPU_MASK_ALL_PTR:

	#define CPU_MASK_ALL_PTR (&amp;CPU_MASK_ALL)

Which formalizes this practice.  One day gcc could bite us over this
usage (though we seem to have gotten away with it so far).

So replace everywhere which used &amp;CPU_MASK_ALL or CPU_MASK_ALL_PTR
with the modern "cpu_all_mask" (a real const struct cpumask *).

Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Acked-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Reported-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: Mike Travis &lt;travis@sgi.com&gt;
</content>
</entry>
<entry>
<title>tracepoints: add DECLARE_TRACE() and DEFINE_TRACE()</title>
<updated>2008-11-16T08:01:36Z</updated>
<author>
<name>Mathieu Desnoyers</name>
<email>mathieu.desnoyers@polymtl.ca</email>
</author>
<published>2008-11-14T22:47:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7e066fb870fcd1025ec3ba7bbde5d541094f4ce1'/>
<id>urn:sha1:7e066fb870fcd1025ec3ba7bbde5d541094f4ce1</id>
<content type='text'>
Impact: API *CHANGE*. Must update all tracepoint users.

Add DEFINE_TRACE() to tracepoints to let them declare the tracepoint
structure in a single spot for all the kernel. It helps reducing memory
consumption, especially when declaring a lot of tracepoints, e.g. for
kmalloc tracing.

*API CHANGE WARNING*: now, DECLARE_TRACE() must be used in headers for
tracepoint declarations rather than DEFINE_TRACE(). This is the sane way
to do it. The name previously used was misleading.

Updates scheduler instrumentation to follow this API change.

Signed-off-by: Mathieu Desnoyers &lt;mathieu.desnoyers@polymtl.ca&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>Merge branch 'tracing-v28-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip</title>
<updated>2008-10-20T20:35:07Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2008-10-20T20:35:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=92b29b86fe2e183d44eb467e5e74a5f718ef2e43'/>
<id>urn:sha1:92b29b86fe2e183d44eb467e5e74a5f718ef2e43</id>
<content type='text'>
* 'tracing-v28-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (131 commits)
  tracing/fastboot: improve help text
  tracing/stacktrace: improve help text
  tracing/fastboot: fix initcalls disposition in bootgraph.pl
  tracing/fastboot: fix bootgraph.pl initcall name regexp
  tracing/fastboot: fix issues and improve output of bootgraph.pl
  tracepoints: synchronize unregister static inline
  tracepoints: tracepoint_synchronize_unregister()
  ftrace: make ftrace_test_p6nop disassembler-friendly
  markers: fix synchronize marker unregister static inline
  tracing/fastboot: add better resolution to initcall debug/tracing
  trace: add build-time check to avoid overrunning hex buffer
  ftrace: fix hex output mode of ftrace
  tracing/fastboot: fix initcalls disposition in bootgraph.pl
  tracing/fastboot: fix printk format typo in boot tracer
  ftrace: return an error when setting a nonexistent tracer
  ftrace: make some tracers reentrant
  ring-buffer: make reentrant
  ring-buffer: move page indexes into page headers
  tracing/fastboot: only trace non-module initcalls
  ftrace: move pc counter in irqtrace
  ...

Manually fix conflicts:
 - init/main.c: initcall tracing
 - kernel/module.c: verbose level vs tracepoints
 - scripts/bootgraph.pl: fallout from cherry-picking commits.
</content>
</entry>
<entry>
<title>kthread_bind: use wait_task_inactive(TASK_UNINTERRUPTIBLE)</title>
<updated>2008-10-20T15:52:39Z</updated>
<author>
<name>Oleg Nesterov</name>
<email>oleg@tv-sign.ru</email>
</author>
<published>2008-10-19T03:28:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=293adee601bcd4cdb5076a9bda187137de17e96e'/>
<id>urn:sha1:293adee601bcd4cdb5076a9bda187137de17e96e</id>
<content type='text'>
Now that wait_task_inactive(task, state) checks task-&gt;state == state,
we can simplify the code and make this debugging check more robust.

Signed-off-by: Oleg Nesterov &lt;oleg@tv-sign.ru&gt;
Cc: Roland McGrath &lt;roland@redhat.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&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>tracing, sched: LTTng instrumentation - scheduler</title>
<updated>2008-10-14T08:30:52Z</updated>
<author>
<name>Mathieu Desnoyers</name>
<email>mathieu.desnoyers@polymtl.ca</email>
</author>
<published>2008-07-18T16:16:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0a16b6075843325dc402edf80c1662838b929aff'/>
<id>urn:sha1:0a16b6075843325dc402edf80c1662838b929aff</id>
<content type='text'>
Instrument the scheduler activity (sched_switch, migration, wakeups,
wait for a task, signal delivery) and process/thread
creation/destruction (fork, exit, kthread stop). Actually, kthread
creation is not instrumented in this patch because it is architecture
dependent. It allows to connect tracers such as ftrace which detects
scheduling latencies, good/bad scheduler decisions. Tools like LTTng can
export this scheduler information along with instrumentation of the rest
of the kernel activity to perform post-mortem analysis on the scheduler
activity.

About the performance impact of tracepoints (which is comparable to
markers), even without immediate values optimizations, tests done by
Hideo Aoki on ia64 show no regression. His test case was using hackbench
on a kernel where scheduler instrumentation (about 5 events in code
scheduler code) was added. See the "Tracepoints" patch header for
performance result detail.

Changelog :

- Change instrumentation location and parameter to match ftrace
  instrumentation, previously done with kernel markers.

[ mingo@elte.hu: conflict resolutions ]
Signed-off-by: Mathieu Desnoyers &lt;mathieu.desnoyers@polymtl.ca&gt;
Acked-by: 'Peter Zijlstra' &lt;peterz@infradead.org&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>tracehook: wait_task_inactive</title>
<updated>2008-07-26T19:00:09Z</updated>
<author>
<name>Roland McGrath</name>
<email>roland@redhat.com</email>
</author>
<published>2008-07-26T02:45:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=85ba2d862e521375a8ee01526c5c46b1f24bb4af'/>
<id>urn:sha1:85ba2d862e521375a8ee01526c5c46b1f24bb4af</id>
<content type='text'>
This extends wait_task_inactive() with a new argument so it can be used in
a "soft" mode where it will check for the task changing state unexpectedly
and back off.  There is no change to existing callers.  This lays the
groundwork to allow robust, noninvasive tracing that can try to sample a
blocked thread but back off safely if it wakes up.

Signed-off-by: Roland McGrath &lt;roland@redhat.com&gt;
Cc: Oleg Nesterov &lt;oleg@tv-sign.ru&gt;
Reviewed-by: Ingo Molnar &lt;mingo@elte.hu&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: reduce stack pressure in create_kthread and kthreadd</title>
<updated>2008-07-18T16:46:58Z</updated>
<author>
<name>Mike Travis</name>
<email>travis@sgi.com</email>
</author>
<published>2008-07-08T22:55:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8df185a95c9b84fc0c3c02224e64fdc5b83bae34'/>
<id>urn:sha1:8df185a95c9b84fc0c3c02224e64fdc5b83bae34</id>
<content type='text'>
  * Replace:

  	set_cpus_allowed(..., CPU_MASK_ALL)

    with:

  	set_cpus_allowed_ptr(..., CPU_MASK_ALL_PTR)

    to remove excessive stack requirements when NR_CPUS=4096.

Signed-off-by: Mike Travis &lt;travis@sgi.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&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.shady.money/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>
</feed>
