Messages in this thread | | | Date | Tue, 15 Jun 2010 20:15:47 +0200 | From | Stefan Richter <> | Subject | Re: [PATCHSET] workqueue: concurrency managed workqueue, take#5 |
| |
Andrew Morton wrote: > On Mon, 14 Jun 2010 23:37:17 +0200 > Tejun Heo <tj@kernel.org> 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, or - 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 -=====-==-=- -==- -==== http://arcgraph.de/sr/
| |