[sheepdog] [PATCH v2 05/10] work: try to create worker threads in worker_thread_request_done

Liu Yuan namei.unix at gmail.com
Tue May 14 06:50:35 CEST 2013


On 05/14/2013 11:33 AM, MORITA Kazutaka wrote:
> At Tue, 14 May 2013 11:18:12 +0800,
> Liu Yuan wrote:
>>
>> On 05/13/2013 11:11 PM, MORITA Kazutaka wrote:
>>> Currently, even if the number of nodes is increased, the dynamic work
>>> queue doesn't create worker threads until new work is added to the
>>> queue.  This tries to create threads just after the work queue detect
>>> that the cluster is expanded.
>>
>> Why expanding at queue_work() isn't enough? Nodes are rarely added, so
>> most of the time, expanding at queue_work() works fine. It looks much
>> cleaner if we can reduce expanding call to one.
> 
> The reason I added this patch is that 'collie vdi check' calls all the
> queue_work() before setting nr_nodes in work_queue_request_done(), so
> there is no chance to extend the number of worker threads.  Maybe,
> initializing nr_nodes in init_work_queue() is much better than this
> patch.
> 

Let collie take care of this looks better to me. Well, sd_nodes_nr is
initialized at very early stage, why get_nr_nodes() don't set nr_nodes
before calling queue_work()?

Thanks,
Yuan




More information about the sheepdog mailing list