Perhaps
void sched_exit(struct task_struct *p)
{
task_t *t, *did_fork = p->parent;
if (!thread_group_leader(p))
list_for_each_entry(t, p->thread_group)
if (!t->exit_state) {
did_fork = t;
break;
}
... give time_slice to did_fork ..
}
may improve things a little bit, because the rest of time_slice doesn't leak
off the thread group.
However this is not very nice and we have the same problem with CLONE_PARENT.
Oleg.
-