Oleg Nesterov 9cd80bbb07 do_wait() optimization: do not place sub-threads on task_struct->children list
Thanks to Roland who pointed out de_thread() issues.

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, and de_thread() needs another list_replace() when it
changes ->group_leader.

Henceforth do_wait_thread() can never see task_detached() && !EXIT_DEAD
tasks, we can remove this check (and we can unify do_wait_thread() and
ptrace_do_wait()).

This change can confuse the optimistic search in mm_update_next_owner(),
but this is fixable and minor.

Perhaps badness() and oom_kill_process() should be updated, but they
should be fixed in any case.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Cc: Roland McGrath <roland@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Ratan Nalumasu <rnalumasu@gmail.com>
Cc: Vitaly Mayatskikh <vmayatsk@redhat.com>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-12-17 15:45:31 -08:00
..
2009-09-21 14:29:21 +02:00
2009-12-15 08:53:10 -08:00
2009-06-24 00:02:38 -04:00
2009-10-29 07:39:25 -07:00
2009-12-06 21:10:56 +01:00
2009-09-18 09:48:52 -07:00
2008-10-16 11:21:30 -07:00
2009-06-16 19:47:48 -07:00
2009-12-14 23:55:34 +01:00
2009-09-19 13:13:17 -07:00
2009-07-24 10:53:29 +02:00
2009-01-14 18:09:02 +01:00
2009-06-18 13:03:56 -07:00
2009-12-16 10:23:43 -08:00
2009-12-16 10:23:43 -08:00
2009-12-09 10:03:07 +01:00
2009-12-14 23:55:33 +01:00
2009-10-26 09:40:30 +01:00
2009-07-12 14:03:27 -07:00
2009-09-23 18:13:10 -07:00
2009-11-02 16:02:39 +01:00
2009-06-18 13:03:55 -07:00