Re: workqueue thing

Tejun Heo
2009-12-23T03:46:38Z

Hello,

On 12/22/2009 08:04 PM, Peter Zijlstra wrote:
> On Tue, 2009-12-22 at 08:50 +0900, Tejun Heo wrote:
>>> Also, I think that whole move tasks back on online stuff is utter crazy,
>>> just move then to another cpu and leave them there.
>>
>> Can you be more specific? Why is it crazy when moving to online but
>> !active cpu is necessary anyway?
>
> because its extra (and above all ugly code) that serves no purpose what
> so ever.

The forward progress guarantee requires rescuers to migrate to online
but !active CPUs during CPU_DOWN_PREPARE, so the only extra code
necessary for migrating back remaining workers when a CPU comes back
online is the code to actually do that. That's only a couple tens of
lines of code in the trustee thread.

Now, the other option would to leave those unbound workers alone and
make sure they don't take up new works once new CPUs come online which
would require code in hotter path and results in less consistent
behavior. The tradeoff seems pretty obvious to me. Doesn't it?

Thanks.

--
tejun