Re: [PATCHSET] workqueue: concurrency managed workqueue, take#5

From: Stefan Richter
Date: Tue Jun 15 2010 - 14:46:40 EST

Andrew Morton wrote:
> On Mon, 14 Jun 2010 23:37:17 +0200
> Tejun Heo <tj@xxxxxxxxxx> wrote:
>> This is the fifth take of cmwq (concurrency managed workqueue)
>> patchset.
> What is a concurrency managed workqueue and why do we want one?

>From what I understood, this is about the following:

- Right now, a workqueue is backed by either 1 or by #_of_CPUs
kernel threads. There is no other option.

- To avoid creating half a million of kernel threads, driver authors
resort to either
- using the globally shared workqueue even if they might queue
high-latency work in corner cases,
- creating a single-threaded workqueue even if they put unrelated
jobs into that queue that should better be executed in
parallel, not serially.
(I for one have both cases in drivers/firewire/, and I have similar
issues in the old drivers/ieee1394/.)

The cmwq patch series reforms workqueues to be backed by a global thread
pool. Hence:

+ Driver authors can and should simply register one queue for any one
purpose now. They don't need to worry anymore about having too many
or too few backing threads.

+ [A side effect: In some cases, a driver that currently uses a
thread pool can be simplified by migrating to the workqueue API.]

Tejun, please correct me if I misunderstood.
Stefan Richter
-=====-==-=- -==- -====
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at