[sheepdog] [PATCH] sheep: introduce 'short thread' to worker threads

Liu Yuan namei.unix at gmail.com
Fri Jun 29 08:01:21 CEST 2012


On 06/29/2012 01:41 PM, Liu Yuan wrote:
> This patch introduces *short thread* abstraction that is created on demand and destroyed
> after serving the work when sheep run short of gateway or io threads, aiming to
> solve two problems:
> 
>  1. timeout of IO requests from guests. With on-demand short threads, we guarantee
>     that there is always one thread available to execute the request ASAP.
>  2. system halt for corner cases that all gateway and io threads are executing
>     local requests that ask for creation of another thread to execute the request
>     and sleep wait for response.

Hi Kazum, I am thinking of making threads for gateway and io threads
fully dynamic. How do you think of it?  I think pthread_cond is as
expensive as pthread_create. Fully dynamic threads will allow better
scalability.

Thanks,
Yuan



More information about the sheepdog mailing list