wait for CLONE_THREAD

trifonov@rogers.blackberry.net trifonov@rogers.blackberry.net
Wed Jul 22 18:08:00 GMT 2009


I'm also very interested in the solution to this as I will be implementing a custom task-based scheduling library specialized to a performance-critical application whose constraints make a generic solution not an optimal choice.
------Original Message------
From: 劉 しん
Sender: libc-help-owner@sourceware.org
To: Carlos O'Donell
Cc: Liu Xin
Cc: libc-help@sourceware.org
Subject: Re: wait for CLONE_THREAD
Sent: Jul 22, 2009 10:51

thanks for response. i think i really need a specialized thread lib.   
before that, i conducted an experiment to measure the cost of thread.   
both plain pthread way and thread pool.

because our programs follow a fixed pattern of multi-thread: a group  
of computation-intensive tasks will be fired  in burst. and then main  
program uses barrier to synchronize them.
thread pool uses conditional variables to control tasks.  a task costs  
about 10us and has problem of scalability. we expect to reduce thread  
cost and scale well for SMP.

in addition, we don't worry about portability because this is  
researching attempt. the primary task is to obtain maximal Gflops on 8  
core SMP system( core 2 duo, Linux)

i would like to implement thread model describing as follows:
http://code.google.com/p/libvina/source/browse/libSPMD/DESIGN

again, thanks for your well response.

thanks,
--lx

在 2009-7-23,上午12:01, Carlos O'Donell 写道:

> 2009/7/22 Liu Xin <Liu.Xin@fujixerox.co.jp>:
>> redirect me if i am sent wrong mail-list. I am making my  
>> speficalized thread
>> library.
>>
>> i separated thread into 2 kinds -- leader and task. A group of  
>> tasks is
>> generated by a leader with THREAD_CLONE flags using linux clone(2).
>>
>> a leader is responsible for fireing up his tasks by tkill(2).  
>> however, i
>> found trouble to track progresses in leader thread .
>
> Is there any particular requirement that you have that makes the
> standard POSIX pthread interface unsuitable for your work?
>

> It looks like you are going to a lot of trouble to create something
> which already exists. Building your library on top of the pthread
> interface would make your application portable to Solaris, AIX, HPUX
> etc.
>
> Cheers,
> Carlos.

Thanks,
--lx






More information about the Libc-help mailing list