Re: [patch] exit_free(), 2.5.31-A0

From: Ingo Molnar (mingo@elte.hu)
Date: Tue Aug 13 2002 - 12:50:38 EST


On Tue, 13 Aug 2002, Linus Torvalds wrote:

> It may be small, but it's crap, unless you can explain to me why glibc
> cannot just cannot just catch the death signal in the master thread and
> be done with it (and do all maintenance in the master).

we dont really want any signal overhead, and we also dont want any extra
context-switching to the 'master thread'. And there's no master thread
anymore either.

the pthreads API provides sensible ways to just get rid of a helper thread
without *any* handshaking or notification done after exit with any of the
other threads - the thread has finished its work and is gone forever.

the fundamental problem is getting rid of the stack atomically, it's a
catch-22. A thread can be interrupted by a signal on the last instruction
it executes, it can be ptrace debugged, etc. And something must notify
about completion once the stack is 100% unused.

(i'll add any other, userspace-only solution to the code if there's any
that has equivalent performance - i couldnt find any other solution so
far.)

        Ingo

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



This archive was generated by hypermail 2b29 : Thu Aug 15 2002 - 22:00:33 EST