<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/workqueue.c, branch v2.6.16</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.16</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v2.6.16'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2006-01-15T02:27:06Z</updated>
<entry>
<title>[PATCH] Unlinline a bunch of other functions</title>
<updated>2006-01-15T02:27:06Z</updated>
<author>
<name>Arjan van de Ven</name>
<email>arjan@infradead.org</email>
</author>
<published>2006-01-14T21:20:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=858119e159384308a5dde67776691a2ebf70df0f'/>
<id>urn:sha1:858119e159384308a5dde67776691a2ebf70df0f</id>
<content type='text'>
Remove the "inline" keyword from a bunch of big functions in the kernel with
the goal of shrinking it by 30kb to 40kb

Signed-off-by: Arjan van de Ven &lt;arjan@infradead.org&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Acked-by: Jeff Garzik &lt;jgarzik@pobox.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] fix workqueue oops during cpu offline</title>
<updated>2006-01-09T04:14:08Z</updated>
<author>
<name>Nathan Lynch</name>
<email>ntl@pobox.com</email>
</author>
<published>2006-01-08T09:05:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f756d5e256059018d753f0ba79980ebeb87a1bc0'/>
<id>urn:sha1:f756d5e256059018d753f0ba79980ebeb87a1bc0</id>
<content type='text'>
Use first_cpu(cpu_possible_map) for the single-thread workqueue case.  We
used to hardcode 0, but that broke on systems where !cpu_possible(0) when
workqueue_struct-&gt;cpu_workqueue_struct was changed from a static array to
alloc_percpu.

Commit id bce61dd49d6ba7799be2de17c772e4c701558f14 ("Fix hardcoded cpu=0 in
workqueue for per_cpu_ptr() calls") fixed that for Ben's funky sparc64
system, but it regressed my Power5.  Offlining cpu 0 oopses upon the next
call to queue_work for a single-thread workqueue, because now we try to
manipulate per_cpu_ptr(wq-&gt;cpu_wq, 1), which is uninitialized.

So we need to establish an unchanging "slot" for single-thread workqueues
which will have a valid percpu allocation.  Since alloc_percpu keys off of
cpu_possible_map, which must not change after initialization, make this
slot == first_cpu(cpu_possible_map).

Signed-off-by: Nathan Lynch &lt;ntl@pobox.com&gt;
Cc: &lt;stable@kernel.org&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] Unchecked alloc_percpu() return in __create_workqueue()</title>
<updated>2006-01-09T04:13:54Z</updated>
<author>
<name>Ben Collins</name>
<email>bcollins@debian.org</email>
</author>
<published>2006-01-08T09:03:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=676121fcb66c861804e38d94214fd5670a1ef595'/>
<id>urn:sha1:676121fcb66c861804e38d94214fd5670a1ef595</id>
<content type='text'>
__create_workqueue() not checking return of alloc_percpu()

NULL dereference was possible.

Signed-off-by: Ben Collins &lt;bcollins@ubuntu.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] add schedule_on_each_cpu()</title>
<updated>2006-01-09T04:12:40Z</updated>
<author>
<name>Christoph Lameter</name>
<email>clameter@engr.sgi.com</email>
</author>
<published>2006-01-08T09:00:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=15316ba81aee6775d6079fb46c66c801989e7d10'/>
<id>urn:sha1:15316ba81aee6775d6079fb46c66c801989e7d10</id>
<content type='text'>
swap migration's isolate_lru_page() currently uses an IPI to notify other
processors that the lru caches need to be drained if the page cannot be
found on the LRU.  The IPI interrupt may interrupt a processor that is just
processing lru requests and cause a race condition.

This patch introduces a new function run_on_each_cpu() that uses the
keventd() to run the LRU draining on each processor.  Processors disable
preemption when dealing the LRU caches (these are per processor) and thus
executing LRU draining from another process is safe.

Thanks to Lee Schermerhorn &lt;lee.schermerhorn@hp.com&gt; for finding this race
condition.

Signed-off-by: Christoph Lameter &lt;clameter@sgi.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] Fix hardcoded cpu=0 in workqueue for per_cpu_ptr() calls</title>
<updated>2005-11-28T22:42:23Z</updated>
<author>
<name>Ben Collins</name>
<email>bcollins@debian.org</email>
</author>
<published>2005-11-28T21:43:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bce61dd49d6ba7799be2de17c772e4c701558f14'/>
<id>urn:sha1:bce61dd49d6ba7799be2de17c772e4c701558f14</id>
<content type='text'>
Tracked this down on an Ultra Enterprise 3000.  It's a 6-way machine.  Odd
thing about this machine (and it's good for finding bugs like this) is that
the CPU id's are not 0 based.  For instance, on my machine the CPU's are
6/7/10/11/14/15.

This caused some NULL pointer dereference in kernel/workqueue.c because for
single_threaded workqueue's, it hardcoded the cpu to 0.

I changed the 0's to any_online_cpu(cpu_online_mask), which cpumask.h
claims is "First cpu in mask".  So this fits the same usage.

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] cpu hoptlug: avoid usage of smp_processor_id() in preemptible code</title>
<updated>2005-11-07T15:53:29Z</updated>
<author>
<name>Heiko Carstens</name>
<email>heiko.carstens@de.ibm.com</email>
</author>
<published>2005-11-07T08:58:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a4c4af7c8dc1eccdfb8c57e1684f08179b4407e6'/>
<id>urn:sha1:a4c4af7c8dc1eccdfb8c57e1684f08179b4407e6</id>
<content type='text'>
Replace smp_processor_id() with any_online_cpu(cpu_online_map) in order to
avoid lots of "BUG: using smp_processor_id() in preemptible [00000001]
code:..." messages in case taking a cpu online fails.

All the traces start at the last notifier_call_chain(...) in kernel/cpu.c.
Since we hold the cpu_control semaphore it shouldn't be any problem to access
cpu_online_map.

The reason why cpu_up failed is simply that the cpu that was supposed to be
taken online wasn't even there.  That is because on s390 we never know when a
new cpu comes and therefore cpu_possible_map consists of only ones and doesn't
reflect reality.

Signed-off-by: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Cc: 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] Use alloc_percpu to allocate workqueues locally</title>
<updated>2005-10-31T01:37:18Z</updated>
<author>
<name>Christoph Lameter</name>
<email>clameter@engr.sgi.com</email>
</author>
<published>2005-10-30T23:01:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=89ada67917f516212452443a56b9fd3b65b74dc7'/>
<id>urn:sha1:89ada67917f516212452443a56b9fd3b65b74dc7</id>
<content type='text'>
This patch makes the workqueus use alloc_percpu instead of an array.  The
workqueues are placed on nodes local to each processor.

The workqueue structure can grow to a significant size on a system with
lots of processors if this patch is not applied.  64 bit architectures with
all debugging features enabled and configured for 512 processors will not
be able to boot without this patch.

Signed-off-by: Christoph Lameter &lt;clameter@sgi.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] introduce and use kzalloc</title>
<updated>2005-09-07T23:57:45Z</updated>
<author>
<name>Pekka J Enberg</name>
<email>penberg@cs.Helsinki.FI</email>
</author>
<published>2005-09-06T22:18:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=dd3927105b6f65afb7dac17682172cdfb86d3f00'/>
<id>urn:sha1:dd3927105b6f65afb7dac17682172cdfb86d3f00</id>
<content type='text'>
This patch introduces a kzalloc wrapper and converts kernel/ to use it.  It
saves a little program text.

Signed-off-by: Pekka Enberg &lt;penberg@cs.helsinki.fi&gt;
Signed-off-by: Adrian Bunk &lt;bunk@stusta.de&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] create_workqueue_thread() signedness fix</title>
<updated>2005-09-07T23:57:28Z</updated>
<author>
<name>Mika Kukkonen</name>
<email>mikukkon@gmail.com</email>
</author>
<published>2005-09-06T22:17:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=230649da7cb73914b8b2a1ffc802a2951e970454'/>
<id>urn:sha1:230649da7cb73914b8b2a1ffc802a2951e970454</id>
<content type='text'>
With "-W -Wno-unused -Wno-sign-compare" I get the following compile warning:

  CC      kernel/workqueue.o
kernel/workqueue.c: In function `workqueue_cpu_callback':
kernel/workqueue.c:504: warning: ordered comparison of pointer with integer zero

On error create_workqueue_thread() returns NULL, not negative pointer, so
following trivial patch suggests itself.

Signed-off-by: Mika Kukkonen &lt;mikukkon@gmail.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] remove name length check in a workqueue</title>
<updated>2005-08-10T18:55:19Z</updated>
<author>
<name>James Bottomley</name>
<email>James.Bottomley@SteelEye.com</email>
</author>
<published>2005-08-10T18:29:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=606867443764edac5a2c542f2fa0a12ef7a7c7fd'/>
<id>urn:sha1:606867443764edac5a2c542f2fa0a12ef7a7c7fd</id>
<content type='text'>
We have a chek in there to make sure that the name won't overflow
task_struct.comm[], but it's triggering for scsi with lots of HBAs, only
scsi is using single-threaded workqueues which don't append the "/%d"
anyway.

All too hard.  Just kill the BUG_ON.

Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;

[ kthread_create() uses vsnprintf() and limits the thing, so no
  actual overflow can actually happen regardless ]

Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
</feed>
