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-06-11 21:36:14 -04:00
2009-12-10 15:02:50 +01:00
2009-07-12 12:22:34 -07:00
2009-06-17 00:36:36 -04:00
2009-12-10 09:59:23 +02:00
2009-12-16 12:16:49 -05:00
2009-07-12 12:22:34 -07:00
2009-12-15 08:53:10 -08:00
2009-12-16 07:20:06 -08:00
2009-12-17 11:03:25 -05:00
2009-12-17 11:03:25 -05:00
2009-12-16 07:20:18 -08:00
2009-06-17 00:36:37 -04:00
2009-12-17 11:03:25 -05:00
2009-12-14 21:40:04 +01:00
2009-12-16 07:20:06 -08:00
2009-12-17 11:03:25 -05:00
2009-12-16 07:20:13 -08:00
2009-09-24 08:41:47 -04:00
2008-12-31 18:07:43 -05:00
2009-01-03 11:45:54 -08:00
2009-12-16 07:20:12 -08:00
2009-12-16 07:20:12 -08:00
2009-09-24 07:21:03 -07:00
2009-12-17 04:52:13 -05:00
2009-12-16 13:29:19 -08:00
2009-12-17 11:03:25 -05:00
2009-04-07 08:31:16 -07:00
2009-12-14 18:12:11 -05:00
2009-12-17 10:51:40 -05:00
2009-10-04 15:05:10 -07:00
2009-04-20 23:02:52 -04:00
2009-02-18 15:37:53 -08:00
2009-12-16 12:16:49 -05:00