[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <461B4F76.1010807@garzik.org>
Date: Tue, 10 Apr 2007 04:48:54 -0400
From: Jeff Garzik <jeff@...zik.org>
To: Andrew Morton <akpm@...ux-foundation.org>
CC: Dave Jones <davej@...hat.com>, Robin Holt <holt@....com>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Ingo Molnar <mingo@...e.hu>,
Linus Torvalds <torvalds@...ux-foundation.org>,
linux-kernel@...r.kernel.org,
Jack Steiner <steiner@...ricas.sgi.com>
Subject: Re: init's children list is long and slows reaping children.
Andrew Morton wrote:
> Well that obviously would be a dumb way to use keventd. One would need
> to do schedule_work(), kick off the reset then do schedule_delayed_work()
> to wait (or poll) for its termination.
Far too complex. See what Russell wrote, for instance.
When you are in a kernel thread, you can write more simple,
straightforward, easy-to-debug code that does
blah
msleep()
blah
rather than creating an insanely complicated state machine for the same
thing.
ESPECIALLY if you are already inside a state machine (the case with
libata PIO data xfer), you do not want to add another state machine
inside of that.
A great many uses of kernel threads are to simplify device reset and
polling in this way. I know; a year ago I audited every kernel thread,
because I was so frustrated with the per-CPU thread explosion.
Thus, rather than forcing authors to make their code more complex, we
should find another solution.
Jeff
-
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