<feed xmlns='http://www.w3.org/2005/Atom'>
<title>blackbird-op-linux/kernel/workqueue.c, branch v3.4</title>
<subtitle>Blackbird™ Linux sources for OpenPOWER</subtitle>
<id>https://git.raptorcs.com/git/blackbird-op-linux/atom?h=v3.4</id>
<link rel='self' href='https://git.raptorcs.com/git/blackbird-op-linux/atom?h=v3.4'/>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-op-linux/'/>
<updated>2012-03-21T01:13:22+00:00</updated>
<entry>
<title>Merge branch 'for-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq</title>
<updated>2012-03-21T01:13:22+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-03-21T01:13:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-op-linux/commit/?id=e45836fafe157df137a837093037f741ad8f4c90'/>
<id>urn:sha1:e45836fafe157df137a837093037f741ad8f4c90</id>
<content type='text'>
Pull workqueue changes from Tejun Heo:
 "This contains only one commit which cleans up UP allocation path a
  bit."

* 'for-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq:
  workqueue: use percpu allocator for cwq on UP
</content>
</entry>
<entry>
<title>workqueue: use percpu allocator for cwq on UP</title>
<updated>2012-03-12T16:21:17+00:00</updated>
<author>
<name>Lai Jiangshan</name>
<email>laijs@cn.fujitsu.com</email>
</author>
<published>2012-03-09T10:03:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-op-linux/commit/?id=e06ffa1ede4146cbc261d90f5dff3d63fe2e9d7a'/>
<id>urn:sha1:e06ffa1ede4146cbc261d90f5dff3d63fe2e9d7a</id>
<content type='text'>
I notice that the commit bbddff makes percpu allocator can work on UP,
So we don't need the magic way for UP.

Signed-off-by: Lai Jiangshan &lt;laijs@cn.fujitsu.com&gt;
Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
</content>
</entry>
<entry>
<title>Block: use a freezable workqueue for disk-event polling</title>
<updated>2012-03-02T09:51:00+00:00</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2012-03-02T09:51:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-op-linux/commit/?id=62d3c5439c534b0e6c653fc63e6d8c67be3a57b1'/>
<id>urn:sha1:62d3c5439c534b0e6c653fc63e6d8c67be3a57b1</id>
<content type='text'>
This patch (as1519) fixes a bug in the block layer's disk-events
polling.  The polling is done by a work routine queued on the
system_nrt_wq workqueue.  Since that workqueue isn't freezable, the
polling continues even in the middle of a system sleep transition.

Obviously, polling a suspended drive for media changes and such isn't
a good thing to do; in the case of USB mass-storage devices it can
lead to real problems requiring device resets and even re-enumeration.

The patch fixes things by creating a new system-wide, non-reentrant,
freezable workqueue and using it for disk-events polling.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
CC: &lt;stable@kernel.org&gt;
Acked-by: Tejun Heo &lt;tj@kernel.org&gt;
Acked-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>workqueue: make alloc_workqueue() take printf fmt and args for name</title>
<updated>2012-01-11T00:30:54+00:00</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2012-01-10T23:11:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-op-linux/commit/?id=b196be89cdc14a88cc637cdad845a75c5886c82d'/>
<id>urn:sha1:b196be89cdc14a88cc637cdad845a75c5886c82d</id>
<content type='text'>
alloc_workqueue() currently expects the passed in @name pointer to remain
accessible.  This is inconvenient and a bit silly given that the whole wq
is being dynamically allocated.  This patch updates alloc_workqueue() and
friends to take printf format string instead of opaque string and matching
varargs at the end.  The name is allocated together with the wq and
formatted.

alloc_ordered_workqueue() is converted to a macro to unify varargs
handling with alloc_workqueue(), and, while at it, add comment to
alloc_workqueue().

None of the current in-kernel users pass in string with '%' as constant
name and this change shouldn't cause any problem.

[akpm@linux-foundation.org: use __printf]
Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Suggested-by: Christoph Hellwig &lt;hch@infradead.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>kernel: Map most files to use export.h instead of module.h</title>
<updated>2011-10-31T13:20:12+00:00</updated>
<author>
<name>Paul Gortmaker</name>
<email>paul.gortmaker@windriver.com</email>
</author>
<published>2011-05-23T18:51:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-op-linux/commit/?id=9984de1a5a8a96275fcab818f7419af5a3c86e71'/>
<id>urn:sha1:9984de1a5a8a96275fcab818f7419af5a3c86e71</id>
<content type='text'>
The changed files were only including linux/module.h for the
EXPORT_SYMBOL infrastructure, and nothing else.  Revector them
onto the isolated export header for faster compile times.

Nothing to see here but a whole lot of instances of:

  -#include &lt;linux/module.h&gt;
  +#include &lt;linux/export.h&gt;

This commit is only changing the kernel dir; next targets
will probably be mm, fs, the arch dirs, etc.

Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
</content>
</entry>
<entry>
<title>workqueue: lock cwq access in drain_workqueue</title>
<updated>2011-09-15T01:09:38+00:00</updated>
<author>
<name>Thomas Tuttle</name>
<email>ttuttle@chromium.org</email>
</author>
<published>2011-09-14T23:22:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-op-linux/commit/?id=fa2563e41c3d6d6e8af437643981ed28ae0cb56d'/>
<id>urn:sha1:fa2563e41c3d6d6e8af437643981ed28ae0cb56d</id>
<content type='text'>
Take cwq-&gt;gcwq-&gt;lock to avoid racing between drain_workqueue checking to
make sure the workqueues are empty and cwq_dec_nr_in_flight decrementing
and then incrementing nr_active when it activates a delayed work.

We discovered this when a corner case in one of our drivers resulted in
us trying to destroy a workqueue in which the remaining work would
always requeue itself again in the same workqueue.  We would hit this
race condition and trip the BUG_ON on workqueue.c:3080.

Signed-off-by: Thomas Tuttle &lt;ttuttle@chromium.org&gt;
Acked-by: Tejun Heo &lt;tj@kernel.org&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>Merge branch 'for-3.1' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq</title>
<updated>2011-07-22T22:07:15+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2011-07-22T22:07:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-op-linux/commit/?id=5a791ea4fa4495f7136679cb5366f6544148e613'/>
<id>urn:sha1:5a791ea4fa4495f7136679cb5366f6544148e613</id>
<content type='text'>
* 'for-3.1' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq:
  workqueue: separate out drain_workqueue() from destroy_workqueue()
  workqueue: remove cancel_rearming_delayed_work[queue]()
</content>
</entry>
<entry>
<title>Merge branch 'for-2.6.40' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu</title>
<updated>2011-05-24T18:53:42+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2011-05-24T18:53:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-op-linux/commit/?id=5129df03d0c44b2d5a5f9d7d52f3b079706b9a8f'/>
<id>urn:sha1:5129df03d0c44b2d5a5f9d7d52f3b079706b9a8f</id>
<content type='text'>
* 'for-2.6.40' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu:
  percpu: Unify input section names
  percpu: Avoid extra NOP in percpu_cmpxchg16b_double
  percpu: Cast away printk format warning
  percpu: Always align percpu output section to PAGE_SIZE

Fix up fairly trivial conflict in arch/x86/include/asm/percpu.h as per Tejun
</content>
</entry>
<entry>
<title>workqueue: separate out drain_workqueue() from destroy_workqueue()</title>
<updated>2011-05-20T11:54:46+00:00</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2011-04-05T16:01:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-op-linux/commit/?id=9c5a2ba70251ecaab18c7a83e38b3c620223476c'/>
<id>urn:sha1:9c5a2ba70251ecaab18c7a83e38b3c620223476c</id>
<content type='text'>
There are users which want to drain workqueues without destroying it.
Separate out drain functionality from destroy_workqueue() into
drain_workqueue() and make it accessible to workqueue users.

To guarantee forward-progress, only chain queueing is allowed while
drain is in progress.  If a new work item which isn't chained from the
running or pending work items is queued while draining is in progress,
WARN_ON_ONCE() is triggered.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Cc: James Bottomley &lt;James.Bottomley@hansenpartnership.com&gt;
</content>
</entry>
<entry>
<title>workqueue: fix deadlock in worker_maybe_bind_and_lock()</title>
<updated>2011-04-29T16:08:37+00:00</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2011-04-29T16:08:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-op-linux/commit/?id=5035b20fa5cd146b66f5f89619c20a4177fb736d'/>
<id>urn:sha1:5035b20fa5cd146b66f5f89619c20a4177fb736d</id>
<content type='text'>
If a rescuer and stop_machine() bringing down a CPU race with each
other, they may deadlock on non-preemptive kernel.  The CPU won't
accept a new task, so the rescuer can't migrate to the target CPU,
while stop_machine() can't proceed because the rescuer is holding one
of the CPU retrying migration.  GCWQ_DISASSOCIATED is never cleared
and worker_maybe_bind_and_lock() retries indefinitely.

This problem can be reproduced semi reliably while the system is
entering suspend.

 http://thread.gmane.org/gmane.linux.kernel/1122051

A lot of kudos to Thilo-Alexander for reporting this tricky issue and
painstaking testing.

stable: This affects all kernels with cmwq, so all kernels since and
        including v2.6.36 need this fix.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Reported-by: Thilo-Alexander Ginkel &lt;thilo@ginkel.com&gt;
Tested-by: Thilo-Alexander Ginkel &lt;thilo@ginkel.com&gt;
Cc: stable@kernel.org
</content>
</entry>
</feed>
