Re: init's children list is long and slows reaping children.

From: Eric W. Biederman
Date: Fri Apr 06 2007 - 05:11:39 EST


Oleg Nesterov <oleg@xxxxxxxxxx> writes:

> Robin Holt wrote:
>>
>> wait_task_zombie() is taking many seconds to get through the list.
>> For the case of a modprobe, stop_machine creates one thread per cpu
>> (remember big number). All are parented to init and their exit will
>> cause wait_task_zombie to scan multiple times most of the way through
>> this very long list looking for threads which need to be reaped.
>
> Could you try this patch
>
> http://marc.info/?l=linux-kernel&m=117337194209912
>
> ?
>
> It can't solve the whole problem, but at least an exiting kernel thread
> won't kick init.

At first glance your patch looks reasonable.

Unfortunately it only applies to the rare thread that calls daemonize,
and not also to kernel/kthread/kthread() which means it will miss many of
our current kernel threads.

For the sgi problem I doubt it is will make a difference but the change
is certainly worth making.

Eric
-
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/