Re: workqueue thing

Peter Zijlstra
2009-12-22T17:48:53Z

On Tue, 2009-12-22 at 09:20 -0800, Linus Torvalds wrote:
>
> So stop arguing about irrelevancies. Nobody uses workqueues for RT or for
> CPU-intensive crap. It's not what they were designed for, or used for.

RT crap maybe, but cpu intensive bits are used for sure, see the
crypto/crypto_wq.c drivers/md/dm*.c.

I've seen those consume significant amounts of cpu, now I'm not going to
argue that workqueues are not the best way to consume lots of cpu, but
the fact is they _are_ used for that.

And since tejun's thing doesn't have wakeup parallelism covered these
uses can turn into significant loads.

> If you _want_ to use them for that, that is _your_ problem. Not Tejuns.

I don't want to use workqueues at all.

> People use workqueues for other things _today_, and they have annoying
> problems as they stand. It would be nice to get rid of the deadlock
> issue, for example - right now the tty driver literally does crazy things,
> and drops locks that it shouldn't drop due to the fact that it needs to
> wait for queued work - even if the queued work it is actually waiting for
> isn't the one that takes the lock!

Which in turn would imply we cannot carry fwd the current lockdep
annotations, right?

Which means we'll be stuck in a situation where A flushes B and B
flushes A will go undetected until we actually hit it.

Where exactly does the tty thing live in the code?