lkml.org 
[lkml]   [2007]   [Apr]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: init's children list is long and slows reaping children.


On Fri, 6 Apr 2007, Oleg Nesterov wrote:
>
> Oops. I misread stop_machine(), it does kernel_thread(), not kthread_create().
> So "stopmachine" threads are all re-parented to init when the caller exits.
> I think it makes sense to set ->exit_state = -1 in stopmachine(), regadless
> of any other changes.

I agree that "->exit_state = -1" makes sense, but I disagree in that I
don't think it *matters*.

Most of the problematic kernel threads are long-running (as in "never
exit"). Things like eventd, khelper, migration-threads etc will have init
as their parent and never actually exit, so their ->exit_state doesn't
matter. What matters is that they are on the children list, so when you
have 1024 CPU's, and init has many thousand of these per-cpu threads as
its children, then the *user* threads (that do exit) will cause problems!

I'd almost prefer to just not add kernel threads to any parent process
list *at*all*.

Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-04-06 19:19    [W:0.334 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site