lkml.org 
[lkml]   [2000]   [Sep]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: thread group comments
On Fri, Sep 01, 2000 at 06:33:42PM -0700, Ulrich Drepper wrote:
> "Andi Kleen" <ak@suse.de> writes:
>
> > But I guess you don't want the context switch to a thread manager just to
> > generate a thread ? (and which is one of the main causes of the bad thread
> > creation latency in Linux currently)
>
> The thread manager, is I see it in the moment, will consist more or
> less of this:
>
> extern volatile int nthreads;
> do
> waitpid (0, &res, __WCLONE)
> while (nthreads > 0);
> exit (WEXITSTATUS (res));
>
> No signal handler, since it cannot receive signals. Everything else
> the threads will do themselves.

With SA_NOCLDWAIT you wouldn't need that. IMHO wait does not make too much
sense for threads, because it is cheaper to just store the pthread exit data
somewhere in the address room (what I think the current implementation does
anyways)


-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:38    [W:0.084 / U:27.200 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site