[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070406200116.GA169@tv-sign.ru>
Date: Sat, 7 Apr 2007 00:01:16 +0400
From: Oleg Nesterov <oleg@...sign.ru>
To: Ingo Molnar <mingo@...e.hu>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Robin Holt <holt@....com>, Chris Snook <csnook@...hat.com>,
linux-kernel@...r.kernel.org
Subject: Re: init's children list is long and slows reaping children.
On 04/06, Ingo Molnar wrote:
>
> * Oleg Nesterov <oleg@...sign.ru> wrote:
>
> > > I'd almost prefer to just not add kernel threads to any parent
> > > process list *at*all*.
> >
> > Yes sure, I didn't argue with that. However, "->exit_state = -1" does
> > matter, we can't detach process unless we make it auto-reap.
>
> > Off course, we also need to add preparent_to_init() to kthread() and
> > (say) stopmachine(). Or we can create kernel_thread_detached() and
> > modify callers to use it.
>
> this isnt a kernel-thread special case. The right solution IMO is to
> first migrate wait4()'s ->children use over to a new p->exiting_children
> list and then to gradually get rid of all remaining uses of p->children.
> (the first patch of which i sent a few minutes ago)
>
> that way wait4() will be sped up, and quite dramatically i believe. No
> need to deal with kthreads here at all - those just wont ever show up in
> the ->exiting_children list. Am i missing something?
Probably it is I who missed something :)
But why can't we do both changes? I think it is just ugly to use init to
reap the kernel thread. Ok, wait4() can find zombie quickly if we do the
->children split. But /sbin/init could be swapped out, we still need to
deliver SIGCHLD, etc.
And I personally agree with Linus, it is nice to hide the kernel threads
from /sbin/init (or whatever) completely.
No?
Oleg.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists