Re: [PATCH 19/19] workqueue: implement concurrency managed workqueue

Tejun Heo
2009-10-02T12:10:09Z

Hello, Andi.

Andi Kleen wrote:
> Tejun Heo <tj@kernel.org> writes:
>
>> Currently each workqueue has its own dedicated worker pool. This
>> causes the following problems.
>
> I definitely like the basic idea (without having read all the code so
> far). Thanks for doing that work. On large systems the number of
> kernel threads around can be mind boggling, and it will also get rid
> of bizarreness like the ps2mouse thread.
>
> I wonder have you ever thought about exposing this to user space too?
> It can face similar problems for parallelization.

Yeah, some similar mechanism could be useful to manage userland worker
pool too but determining what to export would be the difficult
question. Events when all of certain groups of threads are blocked
could be useful and cpu idleness is too.

One thing is that for userspace there's already pretty thick layer of
abstraction in place and having this type of bare metal mechanism
might not buy much. In most cases, monitoring system parameters
periodically and supplying a bit of extra threads should be able to
achieve about the same result. Do you have anything specific on your
mind?

Thanks.

--
tejun