All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC v2 0/6] driver-core: add asynch probe support
@ 2014-09-05  6:37 Luis R. Rodriguez
  2014-09-05  6:37 ` [RFC v2 1/6] driver-core: generalize freeing driver private member Luis R. Rodriguez
                   ` (6 more replies)
  0 siblings, 7 replies; 227+ messages in thread
From: Luis R. Rodriguez @ 2014-09-05  6:37 UTC (permalink / raw)
  To: gregkh, dmitry.torokhov, falcon, tiwai, tj, arjan
  Cc: linux-kernel, oleg, hare, akpm, penguin-kernel, joseph.salisbury,
	bpoirier, santosh, Luis R. Rodriguez

From: "Luis R. Rodriguez" <mcgrof@suse.com>

Here's a complete reimplementation of asynch loading support, it
discards completely the hippie / pipe dream idea that we need asynch
loading of modules / subsystems in general and just addresses running
probe asynchronously. This respin is based on Tejun's recommendation
on how to treat the probe asynchronously, we avoid async_schedule()
completely and just peg a struct work_struct on the driver private
structure. This obviously also means we have to flush_work() before
the driver's own remove() is called, we do that too.

Tejun's concerns on this regressing some driver's scripts which expect
the device to be available after loading remains valid, and the only
thing we can do to help there is to annotate the expecations on the
use of this "feature" to driver users. Scripts should be not be relying
on the driver init anyway so that type of usage should be phased out
and they should be hunting in udev for things popping up.

I'm a bit concerned about this actually regressing load time on
drivers that use this though instead of just having the module
probe run off of finit_module() though. Even with a kthread alternative
at least Santosh (Cc'd) has noted a regression in terms of time it
takes to complete probe on cxgb4. I'll eventually get your exact
numbers, but for now its an obvious regression *with* kthreads,
this solution goes with:

queue_work(system_unbound_wq, async_probe_work)

This is surely going to make things even worse... We could
use system_highpri_wq, or change the scheduling priority, but
for that I'd prefer to get feedback and someone to decide what
the right choice (TM) should be.

It is very important to highlight that async probe was added here
in light of issues found on *two* domains now that creeped up in
parallel:

0) some built-in drivers delaying init
1) systemd 30 second timeout

I have been exchanging some e-mails with Tetsuo about his
original proposed work around that started this work when the
systemd 30 second timeout issue creeped up first, this series
includes a slightly modified version of that work around
which should address the sigkill even without 786235ee merged.
There may be others -- and that needs to be witch hunted.
It would also now safely allow us to find drivers that run
over the limit without killing systems / modules. I think that's
probably the best thing to do for now -- as we sweep through and
find these, we could eventually nuke the WARN_ONCE() and completely
listen to the kill. For now its just causing more problems than
solving anything, but its a good reflection of balance of desires
and design between userspace / kernelspace.

Luis R. Rodriguez (6):
  driver-core: generalize freeing driver private member
  driver-core: add driver async_probe support
  kthread: warn on kill signal if not OOM
  cxgb4: use async probe
  mptsas: use async probe
  pata_marvell: use async probe

 drivers/ata/pata_marvell.c                      |  1 +
 drivers/base/base.h                             |  6 +++
 drivers/base/bus.c                              | 72 ++++++++++++++++++++++---
 drivers/base/dd.c                               |  4 ++
 drivers/message/fusion/mptsas.c                 |  1 +
 drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c |  1 +
 include/linux/device.h                          |  5 ++
 kernel/kmod.c                                   | 21 +++++++-
 kernel/kthread.c                                | 19 +++++++
 9 files changed, 122 insertions(+), 8 deletions(-)

-- 
2.0.3


^ permalink raw reply	[flat|nested] 227+ messages in thread

end of thread, other threads:[~2014-10-20 23:43 UTC | newest]

Thread overview: 227+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-05  6:37 [RFC v2 0/6] driver-core: add asynch probe support Luis R. Rodriguez
2014-09-05  6:37 ` [RFC v2 1/6] driver-core: generalize freeing driver private member Luis R. Rodriguez
2014-09-05  6:37 ` [RFC v2 2/6] driver-core: add driver async_probe support Luis R. Rodriguez
2014-09-05 11:24   ` Oleg Nesterov
2014-09-05 11:24     ` Oleg Nesterov
2014-09-05 17:25     ` Luis R. Rodriguez
2014-09-05 17:25       ` Luis R. Rodriguez
2014-09-05 22:10   ` Dmitry Torokhov
2014-10-20 23:43     ` Luis R. Rodriguez
2014-10-20 23:43       ` Luis R. Rodriguez
2014-10-20 23:43       ` Luis R. Rodriguez
2014-09-05  6:37 ` [RFC v2 3/6] kthread: warn on kill signal if not OOM Luis R. Rodriguez
2014-09-05  6:37   ` Luis R. Rodriguez
2014-09-05  7:19   ` Tejun Heo
2014-09-05  7:19     ` Tejun Heo
2014-09-05  7:47     ` Luis R. Rodriguez
2014-09-05  7:47       ` Luis R. Rodriguez
2014-09-05  7:47       ` Luis R. Rodriguez
2014-09-05  9:14       ` Mike Galbraith
2014-09-05  9:14         ` Mike Galbraith
2014-09-05  9:14         ` Mike Galbraith
2014-09-05 14:12       ` Tejun Heo
2014-09-05 14:12         ` Tejun Heo
2014-09-05 14:12         ` Tejun Heo
2014-09-05 16:44         ` Dmitry Torokhov
2014-09-05 16:44           ` Dmitry Torokhov
2014-09-05 17:49           ` Tejun Heo
2014-09-05 17:49             ` Tejun Heo
2014-09-05 18:10             ` Dmitry Torokhov
2014-09-05 18:10               ` Dmitry Torokhov
2014-09-05 22:29               ` Tejun Heo
2014-09-05 22:29                 ` Tejun Heo
2014-09-05 22:31                 ` Tejun Heo
2014-09-05 22:31                   ` Tejun Heo
2014-09-05 22:49                   ` Dmitry Torokhov
2014-09-05 22:49                     ` Dmitry Torokhov
2014-09-05 22:55                     ` Tejun Heo
2014-09-05 22:55                       ` Tejun Heo
2014-09-05 23:22                       ` Dmitry Torokhov
2014-09-05 23:22                         ` Dmitry Torokhov
2014-09-05 23:32                         ` Tejun Heo
2014-09-05 23:32                           ` Tejun Heo
2014-09-05 22:45                 ` Arjan van de Ven
2014-09-05 22:45                   ` Arjan van de Ven
2014-09-05 22:52                   ` Dmitry Torokhov
2014-09-05 22:52                     ` Dmitry Torokhov
2014-09-05 22:52                     ` Dmitry Torokhov
2014-09-05 22:57                     ` Tejun Heo
2014-09-05 22:57                       ` Tejun Heo
2014-09-05 23:05                     ` Arjan van de Ven
2014-09-05 23:05                       ` Arjan van de Ven
2014-09-05 23:05                       ` Arjan van de Ven
2014-09-05 23:18                       ` Dmitry Torokhov
2014-09-05 23:18                         ` Dmitry Torokhov
2014-09-05 23:18                         ` Dmitry Torokhov
2014-09-05 18:12             ` Luis R. Rodriguez
2014-09-05 18:12               ` Luis R. Rodriguez
2014-09-05 18:12               ` Luis R. Rodriguez
2014-09-05 18:29               ` Dmitry Torokhov
2014-09-05 18:29                 ` Dmitry Torokhov
2014-09-05 18:29                 ` Dmitry Torokhov
2014-09-05 22:40               ` Tejun Heo
2014-09-05 22:40                 ` Tejun Heo
2014-09-05 22:40                 ` Tejun Heo
2014-09-09  1:04                 ` Luis R. Rodriguez
2014-09-09  1:04                   ` Luis R. Rodriguez
2014-09-09  1:04                   ` Luis R. Rodriguez
2014-09-09  1:10                   ` Tejun Heo
2014-09-09  1:10                     ` Tejun Heo
2014-09-09  1:10                     ` Tejun Heo
2014-09-09  1:13                     ` Tejun Heo
2014-09-09  1:13                       ` Tejun Heo
2014-09-09  1:13                       ` Tejun Heo
2014-09-09  1:22                     ` Tejun Heo
2014-09-09  1:22                       ` Tejun Heo
2014-09-09  1:22                       ` Tejun Heo
2014-09-09  1:26                       ` Luis R. Rodriguez
2014-09-09  1:26                         ` Luis R. Rodriguez
2014-09-09  1:26                         ` Luis R. Rodriguez
2014-09-09  1:29                         ` Tejun Heo
2014-09-09  1:29                           ` Tejun Heo
2014-09-09  1:29                           ` Tejun Heo
2014-09-09  1:38                           ` Luis R. Rodriguez
2014-09-09  1:38                             ` Luis R. Rodriguez
2014-09-09  1:38                             ` Luis R. Rodriguez
2014-09-09  1:47                             ` Tejun Heo
2014-09-09  1:47                               ` Tejun Heo
2014-09-09  1:47                               ` Tejun Heo
2014-09-09  2:28                               ` Luis R. Rodriguez
2014-09-09  2:28                                 ` Luis R. Rodriguez
2014-09-09  2:28                                 ` Luis R. Rodriguez
2014-09-09  2:39                                 ` Tejun Heo
2014-09-09  2:39                                   ` Tejun Heo
2014-09-09  2:39                                   ` Tejun Heo
2014-09-09  2:57                                   ` Luis R. Rodriguez
2014-09-09  2:57                                     ` Luis R. Rodriguez
2014-09-09  2:57                                     ` Luis R. Rodriguez
2014-09-09  3:03                                     ` Tejun Heo
2014-09-09  3:03                                       ` Tejun Heo
2014-09-09  3:03                                       ` Tejun Heo
2014-09-09  3:19                                       ` Luis R. Rodriguez
2014-09-09  3:19                                         ` Luis R. Rodriguez
2014-09-09  3:19                                         ` Luis R. Rodriguez
2014-09-09  3:25                                         ` Tejun Heo
2014-09-09  3:25                                           ` Tejun Heo
2014-09-09  3:25                                           ` Tejun Heo
2014-09-09 23:03                                           ` Tejun Heo
2014-09-09 23:03                                             ` Tejun Heo
2014-09-09 23:03                                             ` Tejun Heo
2014-09-12 20:14                                             ` Luis R. Rodriguez
2014-09-12 20:14                                               ` Luis R. Rodriguez
2014-09-22 16:36                                     ` Luis R. Rodriguez
2014-09-22 16:36                                       ` Luis R. Rodriguez
2014-09-10  5:13                         ` Tom Gundersen
2014-09-10  5:13                           ` Tom Gundersen
2014-09-10  5:13                           ` Tom Gundersen
2014-09-09  5:38                     ` James Bottomley
2014-09-09  5:38                       ` James Bottomley
2014-09-09  5:38                       ` James Bottomley
2014-09-09 19:16                       ` Luis R. Rodriguez
2014-09-09 19:16                         ` Luis R. Rodriguez
2014-09-09 19:16                         ` Luis R. Rodriguez
2014-09-09 19:35                         ` James Bottomley
2014-09-09 19:35                           ` James Bottomley
2014-09-09 19:35                           ` James Bottomley
2014-09-09 20:45                           ` Luis R. Rodriguez
2014-09-09 20:45                             ` Luis R. Rodriguez
2014-09-09 20:45                             ` Luis R. Rodriguez
2014-09-10  6:46                             ` [systemd-devel] " Tom Gundersen
2014-09-10  6:46                               ` Tom Gundersen
2014-09-10  6:46                               ` Tom Gundersen
2014-09-10 10:07                               ` [systemd-devel] " Ceriel Jacobs
2014-09-10 10:07                                 ` Ceriel Jacobs
2014-09-10 10:07                                 ` Ceriel Jacobs
2014-09-10 13:31                                 ` James Bottomley
2014-09-10 13:31                                   ` James Bottomley
2014-09-10 13:31                                   ` James Bottomley
2014-09-10 21:10                               ` Luis R. Rodriguez
2014-09-10 21:10                                 ` Luis R. Rodriguez
2014-09-10 21:10                                 ` Luis R. Rodriguez
2014-09-11  5:42                                 ` [systemd-devel] " Alexander E. Patrakov
2014-09-11  5:42                                   ` Alexander E. Patrakov
2014-09-11  5:42                                   ` Alexander E. Patrakov
2014-09-11 21:43                                 ` [systemd-devel] " Tom Gundersen
2014-09-11 21:43                                   ` Tom Gundersen
2014-09-11 21:43                                   ` Tom Gundersen
2014-09-11 22:26                                   ` [systemd-devel] " Luis R. Rodriguez
2014-09-11 22:26                                     ` Luis R. Rodriguez
2014-09-11 22:26                                     ` Luis R. Rodriguez
2014-09-12  5:48                                     ` Tom Gundersen
2014-09-12  5:48                                       ` Tom Gundersen
2014-09-12  5:48                                       ` Tom Gundersen
2014-09-12 20:09                                       ` [systemd-devel] " Luis R. Rodriguez
2014-09-12 20:09                                         ` Luis R. Rodriguez
2014-09-12 20:09                                         ` Luis R. Rodriguez
2014-10-10 21:54                                         ` [systemd-devel] " Anatol Pomozov
2014-10-10 21:54                                           ` Anatol Pomozov
2014-10-10 21:54                                           ` Anatol Pomozov
2014-10-10 22:45                                           ` [systemd-devel] " Tom Gundersen
2014-10-10 22:45                                             ` Tom Gundersen
2014-10-10 22:45                                             ` Tom Gundersen
2014-10-15 19:41                                             ` [systemd-devel] " Anatol Pomozov
2014-10-15 19:41                                               ` Anatol Pomozov
2014-10-15 19:41                                               ` Anatol Pomozov
2014-10-15 19:46                                               ` [systemd-devel] " Alexander E. Patrakov
2014-10-15 19:46                                                 ` Alexander E. Patrakov
2014-10-15 19:46                                                 ` Alexander E. Patrakov
2014-09-09 21:42                           ` Tejun Heo
2014-09-09 21:42                             ` Tejun Heo
2014-09-09 21:42                             ` Tejun Heo
2014-09-09 22:26                             ` James Bottomley
2014-09-09 22:26                               ` James Bottomley
2014-09-09 22:26                               ` James Bottomley
2014-09-09 22:41                               ` Tejun Heo
2014-09-09 22:41                                 ` Tejun Heo
2014-09-09 22:41                                 ` Tejun Heo
2014-09-09 22:46                                 ` James Bottomley
2014-09-09 22:46                                   ` James Bottomley
2014-09-09 22:46                                   ` James Bottomley
2014-09-09 22:52                                   ` Tejun Heo
2014-09-09 22:52                                     ` Tejun Heo
2014-09-09 22:52                                     ` Tejun Heo
2014-09-09 23:01                                   ` Dmitry Torokhov
2014-09-09 23:01                                     ` Dmitry Torokhov
2014-09-09 23:01                                     ` Dmitry Torokhov
2014-09-11 19:59                                     ` James Bottomley
2014-09-11 19:59                                       ` James Bottomley
2014-09-11 19:59                                       ` James Bottomley
2014-09-11 20:23                                       ` Dmitry Torokhov
2014-09-11 20:23                                         ` Dmitry Torokhov
2014-09-11 20:23                                         ` Dmitry Torokhov
2014-09-11 20:42                                         ` Luis R. Rodriguez
2014-09-11 20:42                                           ` Luis R. Rodriguez
2014-09-11 20:42                                           ` Luis R. Rodriguez
2014-09-11 20:53                                           ` Dmitry Torokhov
2014-09-11 20:53                                             ` Dmitry Torokhov
2014-09-11 20:53                                             ` Dmitry Torokhov
2014-09-11 21:08                                             ` Luis R. Rodriguez
2014-09-11 21:08                                               ` Luis R. Rodriguez
2014-09-11 21:08                                               ` Luis R. Rodriguez
2014-09-22 19:49                                         ` Pavel Machek
2014-09-22 19:49                                           ` Pavel Machek
2014-09-22 19:49                                           ` Pavel Machek
2014-09-22 20:23                                           ` Dmitry Torokhov
2014-09-22 20:23                                             ` Dmitry Torokhov
2014-09-22 20:23                                             ` Dmitry Torokhov
2014-09-30 21:06                                             ` Pavel Machek
2014-09-30 21:06                                               ` Pavel Machek
2014-09-30 21:06                                               ` Pavel Machek
2014-09-30 21:34                                               ` Dmitry Torokhov
2014-09-30 21:34                                                 ` Dmitry Torokhov
2014-09-30 21:34                                                 ` Dmitry Torokhov
2014-09-09 22:00                         ` Jiri Kosina
2014-09-09 22:00                           ` Jiri Kosina
2014-09-09 22:00                           ` Jiri Kosina
2014-09-05 10:59   ` Oleg Nesterov
2014-09-05 10:59     ` Oleg Nesterov
2014-09-05 17:35     ` Luis R. Rodriguez
2014-09-05 17:35       ` Luis R. Rodriguez
2014-09-05  6:37 ` [RFC v2 4/6] cxgb4: use async probe Luis R. Rodriguez
2014-09-05  6:37 ` [RFC v2 5/6] mptsas: " Luis R. Rodriguez
2014-09-05  7:16   ` Tejun Heo
2014-09-05  7:23   ` Hannes Reinecke
2014-09-05  6:37 ` [RFC v2 6/6] pata_marvell: " Luis R. Rodriguez
2014-09-05  6:59   ` Alexander E. Patrakov
2014-09-05  7:15   ` Tejun Heo
2014-09-05  7:11 ` [RFC v2 0/6] driver-core: add asynch probe support Tejun Heo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.