Re: [PATCH 35/40] fscache: convert object to use workqueue insteadof slow-work

From: Tejun Heo
Date: Thu Feb 18 2010 - 07:28:37 EST


Hello, David.

On 02/18/2010 08:50 PM, David Howells wrote:
> Tejun Heo <tj@xxxxxxxxxx> wrote:
>> The waiting workers are woken up in slow_work_enqueue() when a new
>> work is enqueued regardless of how many workers are currently in use,
>> right? So, it ends up yielding on any queue activity rather than only
>> under resource pressure.
>
> It depends how you define resource pressure, I suppose. There's someone now
> waiting for the resource, and there's someone blocking that resource who can
> yield it as they're waiting on something else. The question is if it's
> cheaper to create a new thread, assuming we're under the limit, or if it's
> cheaper to steal someone else's thread?

Initially I was thinking about adding the hook to global cmwq events
in which case yielding on queueing wouldn't make much sense as it will
always yield very quickly. I'll think more about it but will try to
preserve the current behavior. I'll go ahead and update the patchset.

Thanks for reviewing.

--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/