On Thu, 15 Aug 2002, Ingo Molnar wrote:
>
> in fact testing these changes in glibc revealed another thing - the top of
> the thread's stack has to be 16-byte aligned (for SSE2 support), so the
> attached patch ontop of BK-curr would be a better solution, it does not
> modify the thread's stack alignment but simply writes to the top of the
> stack. (which is the first word of the thread control block.) This removes
> a few instructions both from glibc and from the kernel.
I do not understand why you want to link this to the stack at all. It
doesn't really make sense to me. The "thread exited" thing has nothing to
do with the stack, and you're only focused on that because you want to
free (or re-use) the stack when it exits.
I personally believe that it would make a lot more sense to either pass in
a totally independent pointer, or - my preferred approach - to just re-use
the TID pointer. Think about it: thread creation sets the TID (if
CLONE_SETTID is set) in the thread data structures, and thread exit clears
the TID (if CLONE_CLRTID is set). That sounds like a _sensible_ interface.
(CLONE_RELEASE_VM doesn't really make sense as a name. It doesn't describe
what the flag _means_, it really only describes an implementation detail
inside the kernel).
Eh?
Linus
-
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:40 EST