diff options
author | Arjan van de Ven <arjan@linux.intel.com> | 2009-03-19 12:09:05 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-03-24 19:38:26 -0400 |
commit | f520360d93cdc37de5d972dac4bf3bdef6a7f6a7 (patch) | |
tree | b58da5be7f826d9f7bfda6c1f6cb4174da3fff72 | |
parent | 669420644c79c207f83fdf9105ae782867e2991f (diff) |
kobject: don't block for each kobject_uevent
Right now, the kobject_uevent code blocks for each uevent that's being
generated, due to using (for hystoric reasons) UHM_WAIT_EXEC as flag to
call_usermode_helper(). Specifically, the effect is that each uevent
that is being sent causes the code to wake up keventd, then block until
keventd has processed the work. Needless to say, this happens many times
during the system boot.
This patches changes that to UHN_NO_WAIT (brilliant name for a constant
btw) so that we only schedule the work to fire the uevent message, but
do not wait for keventd to process the work.
This removes one of the bottlenecks during boot; each one of them is
only a small effect, but the sum of them does add up.
[Note, distros that need this are broken, they should be setting
CONFIG_UEVENT_HELPER_PATH to "", that way this code path will never be
excuted at all -- gregkh]
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | lib/kobject_uevent.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/kobject_uevent.c b/lib/kobject_uevent.c index b2181cc8e4d8..e68e743bd861 100644 --- a/lib/kobject_uevent.c +++ b/lib/kobject_uevent.c | |||
@@ -255,7 +255,7 @@ int kobject_uevent_env(struct kobject *kobj, enum kobject_action action, | |||
255 | goto exit; | 255 | goto exit; |
256 | 256 | ||
257 | retval = call_usermodehelper(argv[0], argv, | 257 | retval = call_usermodehelper(argv[0], argv, |
258 | env->envp, UMH_WAIT_EXEC); | 258 | env->envp, UMH_NO_WAIT); |
259 | } | 259 | } |
260 | 260 | ||
261 | exit: | 261 | exit: |