Re: [PATCH 2/3] workqueue: Add an API to create a singlethread workqueueattached to the current task's cgroup

From: Tejun Heo
Date: Thu May 27 2010 - 12:57:53 EST


Hello,

On 05/27/2010 06:39 PM, Michael S. Tsirkin wrote:
>> Unless you're gonna convert every driver to use this
>> special kind of workqueue (and what happens when multiple tasks from
>> different cgroups share the driver?),
>
> We'll then create a workqueue per task. Each workqueue will have the
> right cgroup. But we are not trying to selve the problem for
> every driver.

Ah... I see. You're gonna use multiple workqueues. Once concern that
I have is that this is abuse of workqueue interface to certain level
and depends on the implementation detail of workqueue rather than its
intended usage model. stop_machine() was a similar case and in the
end it was better served by a different mechanism built on kthread
directly (cpu_stop). Wouldn't it be cleaner to use kthread directly
for your case too? You're basically trying to use workqueue as a
frontend to kthread, so...

Thanks.

--
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/