Re: [rfc] do not place sub-threads on task_struct->children list

From: Roland McGrath
Date: Tue Jun 30 2009 - 15:31:37 EST


> Currently we add sub-threads to ->real_parent->children list. This
> buys nothing but slows down do_wait().
>
> With this patch ->children contains only main threads (group leaders).
> The only complication is that forget_original_parent() should iterate
> over sub-threads by hand.

This seems right to me, though I'll admit I haven't really walked through
all the exit/reparent paths afresh with this in mind.

Note that this naturally suggests moving ->sibling to signal_struct. (Of
course that can come later.) The abuse of sibling in reparent_leader adds
a wrinkle to that, but off hand it looks like it could do the same with it
living in signal_struct with a bit of contortion.

Oh, and what about the de_thread() leader-replacement case?


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