Re: workqueue thing

Peter Zijlstra
2009-12-21T14:28:40Z

On Mon, 2009-12-21 at 22:30 +0900, Tejun Heo wrote:

> I think you're primarily concerned with the scheduler modifications

No I think the whole wq redesign sucks chunks, because it:

1) looses the queue property
2) doesn't deal with cpu heavy tasks/wakeup parallelism
3) gets fragile at memory-pressure/reclaim
4) didn't consider the RT needs

Also, I think that whole move tasks back on online stuff is utter crazy,
just move then to another cpu and leave them there.

Also, I don't think it can properly warn of simple AB-BA flush
deadlocks, where work A flushes B and B flushes A.

(I also don't much like the colour coding flush implementation, but I
haven't spend a lot of time considering alternatives)

> and think that the choose-between-two-masks on migration is ugly. I
> agree it's not the prettiest thing in this world but then again it's
> not a lot of code. The reason why it looks ugly is because the way
> migration is implemented and parameter is passed in. API-wise, I
> think making kthread_bind() synchronized against cpu onliness should
> be pretty clean.

Assuming you only migrate blocked tasks the current kthread_bind()
should suit your needs -- I recently reworked most of the migration
logic.

But as it stands I don't think its wise to replace the current workqueue
implementation with this, esp since there are known heavy CPU users
using it, nor have you addressed the queueing issue (or is that the
restoration of the single-queue workqueue?)