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

Christoph Hellwig hch at infradead.org
Tue Jul 3 18:50:44 CEST 2012


On Wed, Jul 04, 2012 at 12:47:08AM +0800, Liu Yuan wrote:
> What is consequence of 'hit the kernel really hard'? overhead of clone()
> system call? For thread pool, we also hit hard on mutex(futex) and
> pthread condition.

I just know that this naive use showed problems in previous projects
I did a few years ago.

> > We'll at least need to keep a pool of available threads around.
> > 
> 
> It is not hard to implement it, but do we really need threads pool? And
> more importantly, why? I think kernel's thread model is capable of
> handling frequent thread creation and destroying in terms of task_struct
> and kernel stack for thread. Also pthreads has internal resource
> pooling, so speaking about performance, I don't think it is not inferior
> compared to static thread pool.

Please provide numbers - fundamental changes like this should come with
extensive benchmark numbers.  I'll try to get some myself, but with the
next release coming up soon I need to finish up the versioning changes.




More information about the sheepdog mailing list