Vladimir Davydov
bcccff93af
kobject: don't block for each kobject_uevent
...
Currently kobject_uevent has somewhat unpredictable semantics. The
point is, since it may call a usermode helper and wait for it to execute
(UMH_WAIT_EXEC), it is impossible to say for sure what lock dependencies
it will introduce for the caller - strictly speaking it depends on what
fs the binary is located on and the set of locks fork may take. There
are quite a few kobject_uevent's users that do not take this into
account and call it with various mutexes taken, e.g. rtnl_mutex,
net_mutex, which might potentially lead to a deadlock.
Since there is actually no reason to wait for the usermode helper to
execute there, let's make kobject_uevent start the helper asynchronously
with the aid of the UMH_NO_WAIT flag.
Personally, I'm interested in this, because I really want kobject_uevent
to be called under the slab_mutex in the slub implementation as it used
to be some time ago, because it greatly simplifies synchronization and
automatically fixes a kmemcg-related race. However, there was a
deadlock detected on an attempt to call kobject_uevent under the
slab_mutex (see https://lkml.org/lkml/2012/1/14/45 ), which was reported
to be fixed by releasing the slab_mutex for kobject_uevent.
Unfortunately, there was no information about who exactly blocked on the
slab_mutex causing the usermode helper to stall, neither have I managed
to find this out or reproduce the issue.
BTW, this is not the first attempt to make kobject_uevent use
UMH_NO_WAIT. Previous one was made by commit f520360d93cd ("kobject:
don't block for each kobject_uevent"), but it was wrong (it passed
arguments allocated on stack to async thread) so it was reverted in
05f54c13cd0c ("Revert "kobject: don't block for each kobject_uevent".").
It targeted on speeding up the boot process though.
Signed-off-by: Vladimir Davydov <vdavydov@parallels.com>
Cc: Greg KH <greg@kroah.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-04-03 16:21:04 -07:00
..
2014-01-02 10:46:41 +01:00
2014-01-30 17:20:32 -08:00
2014-03-07 09:18:23 +01:00
2014-02-17 12:37:09 -08:00
2014-02-19 12:07:55 -07:00
2013-12-31 20:32:26 +02:00
2013-08-14 13:55:15 +05:30
2014-03-19 14:41:58 +09:00
2013-08-19 14:20:21 +05:30
2014-02-06 10:22:56 +01:00
2014-02-19 14:58:17 +01:00
2014-01-24 17:17:30 -08:00
2014-02-15 10:58:17 +00:00
2014-01-25 10:49:30 -08:00
2014-04-01 15:38:47 -07:00
2014-03-28 16:29:35 -04:00
2014-02-13 20:48:02 -08:00
2014-03-17 13:44:14 -04:00
2014-01-20 11:55:23 -08:00
2014-03-06 09:31:43 +01:00
2014-03-09 12:45:08 +05:30
2014-01-16 14:25:37 +01:00
2014-04-02 16:23:38 -07:00
2013-12-23 18:34:58 -08:00
2013-09-10 13:03:41 -07:00
2014-03-26 16:58:11 +00:00
2014-02-22 18:14:13 +01:00
2014-04-02 16:23:38 -07:00
2014-01-24 22:39:54 +01:00
2014-01-30 10:18:43 -08:00
2014-04-02 20:53:45 -07:00
2013-12-08 18:01:56 -08:00
2014-04-01 15:14:04 -07:00
2014-02-22 17:13:01 -05:00
2013-11-09 00:16:28 -05:00
2013-09-24 10:35:17 +01:00
2013-12-02 11:24:18 +00:00
2013-10-27 08:40:39 -04:00
2013-12-09 15:37:58 -05:00
2013-10-17 13:31:19 -07:00
2014-02-12 17:21:22 +00:00
2014-02-28 19:44:55 -08:00
2013-12-24 09:35:17 -08:00
2014-04-03 16:20:49 -07:00
2013-10-16 01:16:04 +02:00
2013-09-30 14:31:02 -07:00
2014-02-05 12:54:53 -08:00
2014-02-11 08:40:45 -07:00
2014-03-30 17:02:06 -07:00
2013-11-23 22:33:56 -08:00
2014-03-13 09:38:42 -06:00
2014-04-01 19:19:15 -07:00
2014-02-24 14:46:32 -08:00
2013-11-08 09:04:30 -07:00
2014-01-30 16:56:54 -08:00
2014-01-13 17:32:27 +01:00
2014-02-14 00:27:58 -05:00
2013-09-04 09:23:46 -04:00
2014-01-23 16:36:56 -08:00
2013-08-30 23:44:11 -07:00
2014-02-09 09:59:23 +08:00
2014-01-03 23:41:42 +01:00
2014-02-11 10:38:30 -05:00
2013-12-31 11:35:12 -08:00
2014-01-30 17:07:18 -08:00
2013-12-22 23:14:27 -08:00
2013-12-04 17:19:44 +01:00
2014-02-09 15:11:47 +01:00
2014-01-21 20:18:26 -08:00
2014-01-21 16:19:48 -08:00
2014-04-02 12:51:41 -07:00
2014-02-13 12:34:05 +01:00
2013-12-05 21:28:41 +08:00
2014-01-23 18:11:00 -08:00
2014-01-23 18:11:00 -08:00
2013-11-15 09:32:21 +09:00
2014-01-10 16:27:36 -08:00
2014-02-07 15:40:17 -08:00
2013-12-29 15:25:48 +01:00
2013-12-02 20:43:15 +01:00
2013-12-02 20:43:14 +01:00
2013-11-09 00:16:29 -05:00
2013-10-23 10:10:20 -07:00
2013-12-04 09:33:34 -04:00
2013-09-13 15:09:52 +02:00
2014-02-18 12:45:38 -08:00
2014-02-18 12:38:37 -08:00
2014-03-26 16:41:41 +01:00
2014-03-11 11:52:47 +01:00
2014-04-03 16:20:58 -07:00
2014-03-13 15:56:44 +01:00
2014-01-15 14:19:42 +07:00
2013-11-03 23:04:56 -05:00
2013-09-07 12:56:26 +10:00
2013-12-12 10:39:01 -08:00
2013-10-03 16:14:12 -07:00
2013-08-18 17:39:55 -07:00
2013-11-15 16:47:22 -08:00
2013-09-20 10:36:34 -04:00
2014-04-01 16:28:19 -07:00
2013-11-23 22:33:51 -08:00
2014-01-09 12:43:40 +01:00
2014-02-13 10:08:52 +05:30
2013-08-27 09:18:29 +02:00
2014-01-21 16:19:41 -08:00
2013-10-31 14:49:24 +00:00
2014-01-29 20:27:23 -08:00
2014-01-09 12:43:37 +01:00
2013-10-23 10:10:12 -07:00
2014-02-17 16:46:48 +01:00
2014-02-17 16:50:37 +01:00
2013-12-11 18:06:47 +01:00
2014-03-05 18:15:37 +00:00
2014-02-24 14:46:38 -08:00
2013-11-09 00:16:24 -05:00
2013-11-09 00:16:23 -05:00
2014-01-15 15:39:33 -08:00
2014-02-12 17:33:03 -05:00
2013-09-07 19:54:57 -04:00
2014-01-16 10:23:02 +10:30
2014-03-19 14:41:58 +09:00
2014-01-06 16:42:20 +09:00
2013-12-18 10:56:13 +10:00
2013-09-26 15:06:58 -07:00
2013-09-26 15:06:58 -07:00
2014-01-25 03:14:36 -05:00
2014-03-10 11:44:42 -04:00
2014-03-31 00:45:09 -04:00
2014-03-07 10:19:57 -05:00
2013-12-08 18:22:32 -08:00
2014-01-21 23:17:20 -08:00
2014-02-28 15:12:09 -08:00
2013-08-22 22:13:54 -07:00
2013-09-12 10:12:47 -07:00
2014-04-03 16:21:01 -07:00
2013-09-27 18:40:25 +01:00
2013-09-27 18:40:25 +01:00
2014-02-18 12:20:45 -08:00
2014-04-03 16:20:51 -07:00
2014-03-20 13:21:05 -04:00
2014-01-02 16:17:12 -05:00
2014-03-03 11:32:08 +01:00
2014-01-23 16:36:52 -08:00
2013-11-19 16:39:06 -05:00
2014-03-10 17:26:19 -07:00
2014-02-20 14:54:28 +01:00
2014-02-19 17:22:44 +01:00
2013-12-17 14:27:17 -05:00
2013-10-11 17:21:14 +11:00
2013-08-30 08:42:01 +10:00
2014-02-17 17:12:47 +01:00
2014-04-02 16:24:28 -07:00
2014-04-01 19:06:50 +02:00
2013-08-26 21:40:24 +02:00
2013-09-26 15:06:58 -07:00
2013-12-19 09:29:43 +01:00
2014-03-20 12:35:45 +01:00
2014-03-04 07:55:47 -08:00
2014-01-23 16:36:50 -08:00
2014-04-03 16:20:59 -07:00
2013-10-13 16:16:26 -07:00
2013-10-13 16:16:28 -07:00
2014-03-08 22:15:52 -08:00
2014-01-16 11:15:50 +01:00
2014-01-29 20:40:08 +01:00
2014-01-26 22:48:35 +01:00
2013-08-26 09:30:03 -07:00
2013-12-07 01:03:14 +01:00
2014-04-02 16:23:38 -07:00
2014-03-20 11:53:20 -04:00
2014-01-04 20:11:33 -05:00
2014-01-04 20:10:24 -05:00
2014-03-26 16:41:28 -04:00
2013-12-29 16:34:25 -05:00
2013-12-11 14:47:40 -05:00
2014-01-23 18:08:10 -08:00
2014-02-13 20:24:13 -08:00
2014-01-09 12:43:40 +01:00
2014-02-19 17:22:44 +01:00
2014-02-13 18:12:04 -08:00
2014-01-09 13:06:59 +01:00
2014-02-26 14:42:09 -07:00
2014-02-25 15:25:45 -08:00
2014-01-27 21:02:39 -08:00
2014-01-19 19:53:18 -08:00
2014-02-21 21:49:07 +01:00
2014-03-14 13:43:33 +01:00
2013-12-19 17:43:04 +00:00
2013-09-13 15:09:52 +02:00
2013-11-19 19:06:41 +01:00
2013-12-07 01:24:33 +01:00
2014-03-31 00:45:09 -04:00
2013-08-09 10:49:00 +02:00
2014-01-16 00:08:12 +01:00
2013-10-19 19:45:35 -04:00
2014-01-08 15:23:53 +00:00
2013-10-03 18:47:54 +02:00
2014-04-01 11:22:57 -07:00
2013-11-13 12:09:07 +09:00
2014-03-20 16:28:09 -07:00
2014-03-08 22:08:29 -08:00
2014-03-06 16:30:46 +01:00
2013-09-25 17:17:01 +01:00
2013-09-25 17:17:01 +01:00
2014-02-19 14:58:17 +01:00
2014-01-25 08:55:09 +01:00
2014-04-03 16:20:50 -07:00
2013-08-28 21:35:14 -07:00
2014-04-03 16:21:04 -07:00
2013-09-11 15:58:52 -07:00
2014-01-21 16:19:45 -08:00
2014-03-21 13:43:13 +01:00
2013-11-09 00:16:21 -05:00
2014-03-19 16:30:23 -04:00
2014-02-13 20:21:59 -08:00
2014-04-03 16:21:01 -07:00
2013-11-13 12:09:24 +09:00
2013-11-15 09:32:22 +09:00
2014-03-31 14:13:25 -07:00
2013-12-20 12:25:45 -08:00
2013-09-11 15:59:45 -07:00
2013-12-11 15:52:34 +01:00
2014-02-28 15:36:37 -08:00
2013-12-26 13:29:35 -05:00
2014-01-23 16:36:51 -08:00
2014-01-23 16:36:51 -08:00
2013-11-13 12:09:06 +09:00
2013-12-20 12:20:26 -08:00
2014-01-21 16:19:44 -08:00
2013-12-11 13:54:13 -05:00
2014-01-21 16:19:49 -08:00
2014-04-02 20:53:45 -07:00
2013-09-11 15:58:01 -07:00
2013-12-20 12:25:45 -08:00
2014-04-03 16:21:03 -07:00
2014-01-21 16:19:44 -08:00
2014-01-23 16:36:50 -08:00
2014-04-03 16:21:01 -07:00
2014-04-01 16:28:19 -07:00
2014-01-16 10:23:03 +10:30
2013-08-20 15:37:42 +09:30
2013-11-09 00:16:19 -05:00
2014-03-04 13:51:06 -05:00
2014-01-27 21:02:39 -08:00
2013-12-13 08:44:30 -07:00
2014-03-11 12:14:56 +01:00
2013-11-09 00:16:19 -05:00
2014-01-14 15:15:25 -08:00
2014-03-28 17:16:51 -04:00
2014-03-31 16:26:40 -04:00
2013-09-26 14:48:15 -07:00
2013-09-26 14:48:15 -07:00
2013-09-26 14:48:15 -07:00
2013-10-14 17:15:48 +02:00
2014-01-01 23:43:36 -05:00
2014-03-29 17:58:37 -04:00
2013-12-05 13:05:48 -08:00
2013-10-28 15:37:43 -04:00
2014-01-31 15:39:07 -08:00
2014-03-01 13:51:53 -06:00
2014-04-01 16:25:51 -04:00
2014-01-25 03:14:05 -05:00
2013-08-27 13:52:52 -04:00
2014-03-07 10:24:49 -05:00
2013-10-09 20:04:10 -05:00
2014-02-05 10:04:37 -06:00
2014-03-11 17:26:47 +00:00
2013-10-29 18:26:14 -07:00
2014-03-07 16:02:46 +01:00
2013-11-08 10:47:28 -06:00
2014-01-13 14:29:49 -08:00
2014-01-03 11:22:21 -08:00
2013-08-28 20:50:19 +01:00
2013-10-24 11:50:36 +01:00
2014-03-11 17:27:12 +00:00
2014-04-02 14:27:15 -07:00
2013-08-15 17:22:27 -07:00
2013-11-13 12:09:04 +09:00
2013-09-03 22:52:48 -04:00
2013-10-30 12:02:58 +08:00
2013-10-09 14:47:45 +02:00
2014-02-06 13:48:51 -08:00
2014-04-03 16:21:04 -07:00
2014-04-03 16:21:00 -07:00
2014-01-23 16:36:55 -08:00
2013-12-07 01:03:14 +01:00
2014-04-01 18:49:04 -07:00
2014-02-06 17:31:52 +01:00
2014-01-10 14:00:47 -07:00
2014-03-19 15:11:19 -06:00
2013-11-14 11:28:18 -07:00
2014-01-23 20:17:18 +00:00
2013-12-05 12:59:23 -05:00
2014-01-23 16:36:50 -08:00
2014-01-12 10:16:07 +01:00
2014-02-17 16:40:09 -05:00
2013-10-24 23:43:29 -04:00
2014-02-20 14:54:28 +01:00
2013-09-26 16:18:32 -07:00
2013-10-25 22:33:23 +02:00
2014-02-11 00:36:00 +01:00
2014-03-02 00:18:15 +01:00
2014-03-20 13:25:54 +01:00
2014-01-25 23:58:17 -05:00
2014-01-28 08:38:04 -08:00
2013-12-23 18:21:11 -08:00
2013-10-17 00:36:06 +02:00
2013-08-19 21:22:34 -07:00
2014-01-13 17:32:27 +01:00
2014-01-23 14:48:35 +01:00
2014-01-25 11:17:34 -08:00
2013-11-26 20:55:33 -08:00
2013-12-20 13:12:01 -08:00
2014-04-01 16:43:18 -04:00
2014-03-21 14:21:13 -04:00
2013-10-16 09:05:57 +02:00
2013-08-14 19:54:30 +01:00
2013-08-20 16:53:58 -05:00
2014-04-03 16:20:54 -07:00
2014-04-03 16:21:01 -07:00
2014-01-23 16:36:58 -08:00
2014-01-21 23:17:20 -08:00
2013-11-13 12:09:33 +09:00
2014-02-17 15:01:52 -08:00
2014-03-31 11:05:24 -07:00
2014-03-20 17:12:25 -07:00
2014-03-20 17:12:25 -07:00
2013-12-18 19:04:50 -08:00
2014-01-21 23:17:20 -08:00
2014-04-01 16:13:21 -07:00
2013-09-12 15:38:02 -07:00
2014-01-16 12:00:56 -08:00
2014-03-20 22:09:09 -07:00
2014-01-13 13:41:50 +01:00
2013-12-17 21:19:08 -08:00
2014-01-13 13:47:36 +01:00
2014-01-28 13:20:09 -08:00
2013-12-08 17:56:37 -08:00
2013-10-09 16:54:39 -07:00
2014-04-01 11:00:07 -07:00
2014-01-19 19:55:50 -08:00
2014-03-31 00:45:09 -04:00
2014-03-10 08:30:02 +01:00
2013-11-15 09:32:20 +09:00
2014-01-12 10:13:59 +01:00
2014-02-28 16:27:18 -08:00
2013-10-16 13:16:19 -07:00
2014-03-17 16:20:49 -07:00
2013-12-07 01:24:33 +01:00
2013-10-17 16:41:50 -07:00
2013-08-27 14:25:27 +05:30
2013-12-19 19:09:38 -05:00
2013-08-27 14:25:09 +05:30
2014-01-27 21:02:39 -08:00
2014-04-03 16:21:00 -07:00
2013-09-10 18:56:32 -04:00
2013-09-01 14:16:33 -07:00
2014-04-02 20:53:45 -07:00
2014-01-25 11:17:34 -08:00
2014-03-10 17:26:19 -07:00
2013-11-22 08:10:34 -08:00
2014-02-24 14:47:15 -08:00
2014-01-22 21:57:05 -08:00
2014-01-13 13:47:36 +01:00
2014-01-13 13:47:36 +01:00
2013-12-16 11:36:13 +01:00
2014-01-27 21:02:40 -08:00
2014-02-15 11:55:28 -08:00
2014-02-17 15:01:37 -08:00
2014-01-21 08:28:07 +00:00
2014-01-21 17:05:27 -08:00
2013-10-09 12:40:45 +02:00
2014-04-03 16:21:01 -07:00
2013-11-15 09:32:14 +09:00
2014-03-26 16:49:31 -04:00
2014-03-04 09:12:24 +01:00
2014-03-25 20:54:57 -07:00
2013-10-16 13:01:44 -07:00
2013-12-07 01:03:14 +01:00
2014-02-26 17:08:40 -05:00
2013-08-29 13:54:34 -07:00
2014-01-14 08:01:10 -08:00
2013-12-04 09:31:34 -04:00
2013-10-17 14:38:44 +02:00
2013-09-25 13:53:10 +02:00
2014-01-15 23:05:31 +01:00
2013-10-10 12:31:43 -07:00
2013-09-20 12:03:46 +02:00
2014-02-23 09:04:27 -08:00
2014-01-06 14:37:25 +01:00
2014-03-03 21:11:05 -05:00
2013-12-09 11:09:24 -08:00
2014-02-18 12:50:26 -08:00
2014-04-02 20:53:45 -07:00
2014-03-14 22:41:36 -04:00
2014-01-13 13:47:37 +01:00
2013-11-26 20:55:33 -08:00
2013-11-20 16:31:01 +01:00
2014-03-04 15:38:16 -08:00
2014-04-01 17:06:09 -07:00
2013-09-24 10:35:19 +01:00
2013-08-29 13:30:21 +10:00
2013-10-11 15:19:22 +10:00
2013-10-17 10:55:37 +10:30
2013-10-29 11:28:11 +10:30
2013-10-29 11:28:17 +10:30
2014-04-03 16:21:04 -07:00
2013-12-03 11:15:58 -08:00
2013-11-22 18:20:43 -05:00
2014-04-03 16:21:00 -07:00
2013-12-02 20:43:15 +01:00
2014-01-23 16:37:04 -08:00
2014-02-27 12:20:31 +01:00
2014-02-28 14:08:26 -05:00
2014-04-01 11:00:07 -07:00
2014-02-22 02:02:28 +01:00
2013-10-17 15:53:09 -04:00
2013-11-26 11:09:08 +01:00
2014-01-30 16:56:55 -08:00