Re: [patch] threading fix, tid-2.5.47-A3

From: Linus Torvalds (torvalds@transmeta.com)
Date: Sun Nov 17 2002 - 23:11:32 EST


On Sun, 17 Nov 2002, Ulrich Drepper wrote:
>
> They don't have to be as such. It's a simple list operation (move all
> active threads except the active one on the free list). That's it. No
> more work especially no resetting of the TID fields.

Ok. So you _do_ do more than just the clone(), but you depend on the clone
to at least set up the local thread descriptor for you.

Fair enough, and it sounds like a good implementation.

I'm convinced. However, I still want som elargely cosmetic changes to the
patch, Ingo:

 - the existing CLONE_SETTID should be called CLONE_PARENT_SETTID, because
   that is how it already works since it is done after the VM copy (this
   is what your patch already does)
 - the existing CLONE_CLEARTID should then be CLONE_CHILD_CLEARTID (your
   existing patch re-numbers this) and using existing semantics
 - the new flag should be CLONE_CHILD_SETTID, and should _not_ renumber
   old existing bits (your existing patch renumbers everything, including
   totally unrelated bits like CLONE_DETATCHED)
 - please don't introduce a new pointer, just use the old one. There
   appears to be no cases where you want to have different pointers
   anyway.

With those changes, no actual behavioural changes should take place, and
the patch is _purely_ adding a new flag (CLONE_CHILD_SETTID) without
changing existing behaviour (yeah, it renames a few old flags too, but
that's purely syntactic).

Plus the patch should be smaller.

                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 : Sat Nov 23 2002 - 22:00:20 EST