Re: [PATCH] Limit number of concurrent hotplug processes
From: Paul Jackson
Date: Wed Jul 28 2004 - 02:52:52 EST
Andrew wrote:
> We'd allocate the same amount of memory if we were sending
> messages up a socket/pipe to userspace, which is what we should always have
> done, instead of the direct-exec - it's caused tons of trouble.
This touches on a question I have, off-topic to the discussion of
the patch proposed by Hannes.
Doesn't doing a direct-exec have one powerful advantage over sending
some message or kevent to userspace by socket/pipe/d-bus, in that
sending the message requires that there is some userspace code already
running that is competent to receive the message?
Doing the usermodehelper direct-exec _both_ provides the thread context
in which to execute, _and_ the code to be executed. The alternative
seems to require long running threads, primed and ready to accept
particular events, cluttering up the system.
I will readily grant that this usermodehelper direct kernel exec thing
seems weird as all heck to me. But I predict that in a couple of weeks
lkml will be seeing a patch from me (the next version of the 'cpuset'
patch I'm working with Simon and Sylvain of Bull) using it -- because
the alternative of a long running, rarely used, user thread just for one
obscure particular event that required user code sucked worse.
Am I missing something? Are there _always_ better solutions than
usermodehelper's kernel direct-exec?
Or perhaps am I confusing what Andrew was referring to and the various
mechanisms available here in unfortunate ways?
--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@xxxxxxx> 1.650.933.1373
-
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/