Re: [PATCH v1 5/5] driver-core: add driver asynchronous probe support

2014-10-03 Thread Luis R. Rodriguez
On Fri, Oct 03, 2014 at 10:11:26PM +0200, Luis R. Rodriguez wrote: > On Fri, Sep 26, 2014 at 02:57:17PM -0700, Luis R. Rodriguez wrote: > > + queue_work(system_unbound_wq, >attach_work->work); > > Tejun, > > based on my testing so far using system_highpri_wq instead of > system_unbound_wq

Re: [PATCH v1 5/5] driver-core: add driver asynchronous probe support

2014-10-03 Thread Luis R. Rodriguez
On Fri, Sep 26, 2014 at 02:57:17PM -0700, Luis R. Rodriguez wrote: > + queue_work(system_unbound_wq, >attach_work->work); Tejun, based on my testing so far using system_highpri_wq instead of system_unbound_wq yields close to par / better boot times than synchronous probe support for all

Re: [PATCH v1 5/5] driver-core: add driver asynchronous probe support

2014-10-03 Thread Luis R. Rodriguez
On Fri, Oct 3, 2014 at 1:23 AM, Tom Gundersen wrote: > On Thu, Oct 2, 2014 at 10:06 PM, Luis R. Rodriguez wrote: >> On Thu, Oct 02, 2014 at 08:12:37AM +0200, Tom Gundersen wrote: >>> Making kmod a special case is of course possible. However, as long as >>> there is no fundamental reason why kmod

Re: [PATCH v1 5/5] driver-core: add driver asynchronous probe support

2014-10-03 Thread Tom Gundersen
On Thu, Oct 2, 2014 at 10:06 PM, Luis R. Rodriguez wrote: > On Thu, Oct 02, 2014 at 08:12:37AM +0200, Tom Gundersen wrote: >> Making kmod a special case is of course possible. However, as long as >> there is no fundamental reason why kmod should get this special >> treatment, this just looks like

Re: [PATCH v1 5/5] driver-core: add driver asynchronous probe support

2014-10-03 Thread Tom Gundersen
On Thu, Oct 2, 2014 at 10:06 PM, Luis R. Rodriguez mcg...@suse.com wrote: On Thu, Oct 02, 2014 at 08:12:37AM +0200, Tom Gundersen wrote: Making kmod a special case is of course possible. However, as long as there is no fundamental reason why kmod should get this special treatment, this just

Re: [PATCH v1 5/5] driver-core: add driver asynchronous probe support

2014-10-03 Thread Luis R. Rodriguez
On Fri, Oct 3, 2014 at 1:23 AM, Tom Gundersen t...@jklm.no wrote: On Thu, Oct 2, 2014 at 10:06 PM, Luis R. Rodriguez mcg...@suse.com wrote: On Thu, Oct 02, 2014 at 08:12:37AM +0200, Tom Gundersen wrote: Making kmod a special case is of course possible. However, as long as there is no

Re: [PATCH v1 5/5] driver-core: add driver asynchronous probe support

2014-10-03 Thread Luis R. Rodriguez
On Fri, Sep 26, 2014 at 02:57:17PM -0700, Luis R. Rodriguez wrote: + queue_work(system_unbound_wq, priv-attach_work-work); Tejun, based on my testing so far using system_highpri_wq instead of system_unbound_wq yields close to par / better boot times than synchronous probe support for all

Re: [PATCH v1 5/5] driver-core: add driver asynchronous probe support

2014-10-03 Thread Luis R. Rodriguez
On Fri, Oct 03, 2014 at 10:11:26PM +0200, Luis R. Rodriguez wrote: On Fri, Sep 26, 2014 at 02:57:17PM -0700, Luis R. Rodriguez wrote: + queue_work(system_unbound_wq, priv-attach_work-work); Tejun, based on my testing so far using system_highpri_wq instead of system_unbound_wq yields

Re: [PATCH v1 5/5] driver-core: add driver asynchronous probe support

2014-10-02 Thread Luis R. Rodriguez
On Tue, Sep 30, 2014 at 09:15:55AM +0200, Luis R. Rodriguez wrote: > Can you provide an example code path hit here? I'll certainly like to address > that as well. I managed to enable built-in driver support on top of this series, I'll send them as part of the next series but I suspect we'll want

Re: [PATCH v1 5/5] driver-core: add driver asynchronous probe support

2014-10-02 Thread Luis R. Rodriguez
On Tue, Sep 30, 2014 at 09:21:59AM +0200, Luis R. Rodriguez wrote: > On Mon, Sep 29, 2014 at 05:26:01PM -0400, Tejun Heo wrote: > > Hello, Luis. > > > > On Mon, Sep 29, 2014 at 11:22:08PM +0200, Luis R. Rodriguez wrote: > > > > > + /* For now lets avoid stupid bug reports */ > > > > > +

Re: [PATCH v1 5/5] driver-core: add driver asynchronous probe support

2014-10-02 Thread Luis R. Rodriguez
As per Tom, adding systemd-devel for advice / review / of the request to avoid the sigkill for kmod workers. Keeping others on Cc as its a discussion that I think can help if both camps are involved. Specially since we've been ping ponging back and forth on this particular topic for a long time

Re: [PATCH v1 5/5] driver-core: add driver asynchronous probe support

2014-10-02 Thread Tom Gundersen
On Tue, Sep 30, 2014 at 5:24 PM, Luis R. Rodriguez wrote: >> > commit e64fae5573e566ce4fd9b23c68ac8f3096603314 >> > Author: Kay Sievers >> > Date: Wed Jan 18 05:06:18 2012 +0100 >> > >> > udevd: kill hanging event processes after 30 seconds >> > >> > Some broken kernel drivers load

Re: [PATCH v1 5/5] driver-core: add driver asynchronous probe support

2014-10-02 Thread Luis R. Rodriguez
As per Tom, adding systemd-devel for advice / review / of the request to avoid the sigkill for kmod workers. Keeping others on Cc as its a discussion that I think can help if both camps are involved. Specially since we've been ping ponging back and forth on this particular topic for a long time

Re: [PATCH v1 5/5] driver-core: add driver asynchronous probe support

2014-10-02 Thread Luis R. Rodriguez
On Tue, Sep 30, 2014 at 09:21:59AM +0200, Luis R. Rodriguez wrote: On Mon, Sep 29, 2014 at 05:26:01PM -0400, Tejun Heo wrote: Hello, Luis. On Mon, Sep 29, 2014 at 11:22:08PM +0200, Luis R. Rodriguez wrote: + /* For now lets avoid stupid bug reports */ + if

Re: [PATCH v1 5/5] driver-core: add driver asynchronous probe support

2014-10-02 Thread Luis R. Rodriguez
On Tue, Sep 30, 2014 at 09:15:55AM +0200, Luis R. Rodriguez wrote: Can you provide an example code path hit here? I'll certainly like to address that as well. I managed to enable built-in driver support on top of this series, I'll send them as part of the next series but I suspect we'll want to

Re: [PATCH v1 5/5] driver-core: add driver asynchronous probe support

2014-10-02 Thread Tom Gundersen
On Tue, Sep 30, 2014 at 5:24 PM, Luis R. Rodriguez mcg...@suse.com wrote: commit e64fae5573e566ce4fd9b23c68ac8f3096603314 Author: Kay Sievers kay.siev...@vrfy.org Date: Wed Jan 18 05:06:18 2012 +0100 udevd: kill hanging event processes after 30 seconds Some broken kernel

Re: [PATCH v1 5/5] driver-core: add driver asynchronous probe support

2014-09-30 Thread Luis R. Rodriguez
On Tue, Sep 30, 2014 at 11:22:14AM +0200, Tom Gundersen wrote: > On Tue, Sep 30, 2014 at 4:27 AM, Luis R. Rodriguez wrote: > > On Sun, Sep 28, 2014 at 07:07:24PM +0200, Tom Gundersen wrote: > >> On Fri, Sep 26, 2014 at 11:57 PM, Luis R. Rodriguez > >> wrote: > >> > From: "Luis R. Rodriguez" >

Re: [PATCH v1 5/5] driver-core: add driver asynchronous probe support

2014-09-30 Thread Tom Gundersen
On Tue, Sep 30, 2014 at 4:27 AM, Luis R. Rodriguez wrote: > On Sun, Sep 28, 2014 at 07:07:24PM +0200, Tom Gundersen wrote: >> On Fri, Sep 26, 2014 at 11:57 PM, Luis R. Rodriguez >> wrote: >> > From: "Luis R. Rodriguez" >> > Systemd has a general timeout for all workers currently set to 180 >> >

Re: [PATCH v1 5/5] driver-core: add driver asynchronous probe support

2014-09-30 Thread Luis R. Rodriguez
On Tue, Sep 30, 2014 at 04:27:51AM +0200, Luis R. Rodriguez wrote: > On Sun, Sep 28, 2014 at 07:07:24PM +0200, Tom Gundersen wrote: > > On Fri, Sep 26, 2014 at 11:57 PM, Luis R. Rodriguez > > wrote: > > > From: "Luis R. Rodriguez" > > > 0) Not all drivers are killed, the signal is just sent and

Re: [PATCH v1 5/5] driver-core: add driver asynchronous probe support

2014-09-30 Thread Luis R. Rodriguez
On Mon, Sep 29, 2014 at 05:26:01PM -0400, Tejun Heo wrote: > Hello, Luis. > > On Mon, Sep 29, 2014 at 11:22:08PM +0200, Luis R. Rodriguez wrote: > > > > + /* For now lets avoid stupid bug reports */ > > > > + if (!strcmp(bus->name, "pci") || > > > > + !strcmp(bus->name,

Re: [PATCH v1 5/5] driver-core: add driver asynchronous probe support

2014-09-30 Thread Luis R. Rodriguez
On Sun, Sep 28, 2014 at 12:22:47PM -0700, Dmitry Torokhov wrote: > Hi Luis, > > On Fri, Sep 26, 2014 at 02:57:17PM -0700, Luis R. Rodriguez wrote: > > +static bool drv_enable_async_probe(struct device_driver *drv, > > + struct bus_type *bus) > > +{ > > + struct

Re: [PATCH v1 5/5] driver-core: add driver asynchronous probe support

2014-09-30 Thread Luis R. Rodriguez
On Sun, Sep 28, 2014 at 12:22:47PM -0700, Dmitry Torokhov wrote: Hi Luis, On Fri, Sep 26, 2014 at 02:57:17PM -0700, Luis R. Rodriguez wrote: +static bool drv_enable_async_probe(struct device_driver *drv, + struct bus_type *bus) +{ + struct module *mod;

Re: [PATCH v1 5/5] driver-core: add driver asynchronous probe support

2014-09-30 Thread Luis R. Rodriguez
On Mon, Sep 29, 2014 at 05:26:01PM -0400, Tejun Heo wrote: Hello, Luis. On Mon, Sep 29, 2014 at 11:22:08PM +0200, Luis R. Rodriguez wrote: + /* For now lets avoid stupid bug reports */ + if (!strcmp(bus-name, pci) || + !strcmp(bus-name, pci_express) || +

Re: [PATCH v1 5/5] driver-core: add driver asynchronous probe support

2014-09-30 Thread Luis R. Rodriguez
On Tue, Sep 30, 2014 at 04:27:51AM +0200, Luis R. Rodriguez wrote: On Sun, Sep 28, 2014 at 07:07:24PM +0200, Tom Gundersen wrote: On Fri, Sep 26, 2014 at 11:57 PM, Luis R. Rodriguez mcg...@do-not-panic.com wrote: From: Luis R. Rodriguez mcg...@suse.com 0) Not all drivers are killed, the

Re: [PATCH v1 5/5] driver-core: add driver asynchronous probe support

2014-09-30 Thread Tom Gundersen
On Tue, Sep 30, 2014 at 4:27 AM, Luis R. Rodriguez mcg...@suse.com wrote: On Sun, Sep 28, 2014 at 07:07:24PM +0200, Tom Gundersen wrote: On Fri, Sep 26, 2014 at 11:57 PM, Luis R. Rodriguez mcg...@do-not-panic.com wrote: From: Luis R. Rodriguez mcg...@suse.com Systemd has a general timeout

Re: [PATCH v1 5/5] driver-core: add driver asynchronous probe support

2014-09-30 Thread Luis R. Rodriguez
On Tue, Sep 30, 2014 at 11:22:14AM +0200, Tom Gundersen wrote: On Tue, Sep 30, 2014 at 4:27 AM, Luis R. Rodriguez mcg...@suse.com wrote: On Sun, Sep 28, 2014 at 07:07:24PM +0200, Tom Gundersen wrote: On Fri, Sep 26, 2014 at 11:57 PM, Luis R. Rodriguez mcg...@do-not-panic.com wrote: From:

Re: [PATCH v1 5/5] driver-core: add driver asynchronous probe support

2014-09-29 Thread Luis R. Rodriguez
On Sun, Sep 28, 2014 at 07:07:24PM +0200, Tom Gundersen wrote: > On Fri, Sep 26, 2014 at 11:57 PM, Luis R. Rodriguez > wrote: > > From: "Luis R. Rodriguez" > > Systemd has a general timeout for all workers currently set to 180 > > seconds after which it will send a sigkill signal. Systemd now

Re: [PATCH v1 5/5] driver-core: add driver asynchronous probe support

2014-09-29 Thread Greg KH
On Mon, Sep 29, 2014 at 03:10:22PM -0700, Luis R. Rodriguez wrote: > On Mon, Sep 29, 2014 at 2:59 PM, Greg KH wrote: > >> Sure make sense, I wasn't quite sure how to make this quite clear, > >> a naming convention seems good to me but I also had added at least > >> a print about this on the log.

Re: [PATCH v1 5/5] driver-core: add driver asynchronous probe support

2014-09-29 Thread Luis R. Rodriguez
On Mon, Sep 29, 2014 at 2:59 PM, Greg KH wrote: >> Sure make sense, I wasn't quite sure how to make this quite clear, >> a naming convention seems good to me but I also had added at least >> a print about this on the log. Ideally I think a TAIN_DEBUG would >> be best and it seems it could be

Re: [PATCH v1 5/5] driver-core: add driver asynchronous probe support

2014-09-29 Thread Greg KH
On Mon, Sep 29, 2014 at 11:22:08PM +0200, Luis R. Rodriguez wrote: > On Sun, Sep 28, 2014 at 11:03:29AM -0400, Tejun Heo wrote: > > Hello, > > > > On Fri, Sep 26, 2014 at 02:57:17PM -0700, Luis R. Rodriguez wrote: > > ... > > > Systemd should consider enabling async probe on device drivers > > >

Re: [PATCH v1 5/5] driver-core: add driver asynchronous probe support

2014-09-29 Thread Tejun Heo
Hello, Luis. On Mon, Sep 29, 2014 at 11:22:08PM +0200, Luis R. Rodriguez wrote: > > > + /* For now lets avoid stupid bug reports */ > > > + if (!strcmp(bus->name, "pci") || > > > + !strcmp(bus->name, "pci_express") || > > > + !strcmp(bus->name, "hid") || > > > + !strcmp(bus->name,

Re: [PATCH v1 5/5] driver-core: add driver asynchronous probe support

2014-09-29 Thread Luis R. Rodriguez
On Sun, Sep 28, 2014 at 11:03:29AM -0400, Tejun Heo wrote: > Hello, > > On Fri, Sep 26, 2014 at 02:57:17PM -0700, Luis R. Rodriguez wrote: > ... > > Systemd should consider enabling async probe on device drivers > > it loads through systemd-udev but probably does not want to > > enable it for

Re: [PATCH v1 5/5] driver-core: add driver asynchronous probe support

2014-09-29 Thread Luis R. Rodriguez
On Sun, Sep 28, 2014 at 11:03:29AM -0400, Tejun Heo wrote: Hello, On Fri, Sep 26, 2014 at 02:57:17PM -0700, Luis R. Rodriguez wrote: ... Systemd should consider enabling async probe on device drivers it loads through systemd-udev but probably does not want to enable it for modules

Re: [PATCH v1 5/5] driver-core: add driver asynchronous probe support

2014-09-29 Thread Tejun Heo
Hello, Luis. On Mon, Sep 29, 2014 at 11:22:08PM +0200, Luis R. Rodriguez wrote: + /* For now lets avoid stupid bug reports */ + if (!strcmp(bus-name, pci) || + !strcmp(bus-name, pci_express) || + !strcmp(bus-name, hid) || + !strcmp(bus-name, sdio) || +

Re: [PATCH v1 5/5] driver-core: add driver asynchronous probe support

2014-09-29 Thread Greg KH
On Mon, Sep 29, 2014 at 11:22:08PM +0200, Luis R. Rodriguez wrote: On Sun, Sep 28, 2014 at 11:03:29AM -0400, Tejun Heo wrote: Hello, On Fri, Sep 26, 2014 at 02:57:17PM -0700, Luis R. Rodriguez wrote: ... Systemd should consider enabling async probe on device drivers it loads

Re: [PATCH v1 5/5] driver-core: add driver asynchronous probe support

2014-09-29 Thread Luis R. Rodriguez
On Mon, Sep 29, 2014 at 2:59 PM, Greg KH gre...@linuxfoundation.org wrote: Sure make sense, I wasn't quite sure how to make this quite clear, a naming convention seems good to me but I also had added at least a print about this on the log. Ideally I think a TAIN_DEBUG would be best and it

Re: [PATCH v1 5/5] driver-core: add driver asynchronous probe support

2014-09-29 Thread Greg KH
On Mon, Sep 29, 2014 at 03:10:22PM -0700, Luis R. Rodriguez wrote: On Mon, Sep 29, 2014 at 2:59 PM, Greg KH gre...@linuxfoundation.org wrote: Sure make sense, I wasn't quite sure how to make this quite clear, a naming convention seems good to me but I also had added at least a print about

Re: [PATCH v1 5/5] driver-core: add driver asynchronous probe support

2014-09-29 Thread Luis R. Rodriguez
On Sun, Sep 28, 2014 at 07:07:24PM +0200, Tom Gundersen wrote: On Fri, Sep 26, 2014 at 11:57 PM, Luis R. Rodriguez mcg...@do-not-panic.com wrote: From: Luis R. Rodriguez mcg...@suse.com Systemd has a general timeout for all workers currently set to 180 seconds after which it will send a

Re: [PATCH v1 5/5] driver-core: add driver asynchronous probe support

2014-09-28 Thread Dmitry Torokhov
Hi Luis, On Fri, Sep 26, 2014 at 02:57:17PM -0700, Luis R. Rodriguez wrote: > +static bool drv_enable_async_probe(struct device_driver *drv, > +struct bus_type *bus) > +{ > + struct module *mod; > + > + if (!drv->owner || drv->sync_probe) > +

Re: [PATCH v1 5/5] driver-core: add driver asynchronous probe support

2014-09-28 Thread Tom Gundersen
Hi Luis, Thanks for the patches and the detailed analysis. Feel free to add Acked-by: Tom Gundersen Minor comments on the commit message below. On Fri, Sep 26, 2014 at 11:57 PM, Luis R. Rodriguez wrote: > From: "Luis R. Rodriguez" > > Some init systems may wish to express the desire to

Re: [PATCH v1 5/5] driver-core: add driver asynchronous probe support

2014-09-28 Thread Tejun Heo
Hello, On Fri, Sep 26, 2014 at 02:57:17PM -0700, Luis R. Rodriguez wrote: ... > Systemd should consider enabling async probe on device drivers > it loads through systemd-udev but probably does not want to > enable it for modules loaded through systemd-modules-load > (modules-load.d). At least on

Re: [PATCH v1 5/5] driver-core: add driver asynchronous probe support

2014-09-28 Thread Tejun Heo
Hello, On Fri, Sep 26, 2014 at 02:57:17PM -0700, Luis R. Rodriguez wrote: ... Systemd should consider enabling async probe on device drivers it loads through systemd-udev but probably does not want to enable it for modules loaded through systemd-modules-load (modules-load.d). At least on my

Re: [PATCH v1 5/5] driver-core: add driver asynchronous probe support

2014-09-28 Thread Tom Gundersen
Hi Luis, Thanks for the patches and the detailed analysis. Feel free to add Acked-by: Tom Gundersen t...@jklm.no Minor comments on the commit message below. On Fri, Sep 26, 2014 at 11:57 PM, Luis R. Rodriguez mcg...@do-not-panic.com wrote: From: Luis R. Rodriguez mcg...@suse.com Some init

Re: [PATCH v1 5/5] driver-core: add driver asynchronous probe support

2014-09-28 Thread Dmitry Torokhov
Hi Luis, On Fri, Sep 26, 2014 at 02:57:17PM -0700, Luis R. Rodriguez wrote: +static bool drv_enable_async_probe(struct device_driver *drv, +struct bus_type *bus) +{ + struct module *mod; + + if (!drv-owner || drv-sync_probe) + return

[PATCH v1 5/5] driver-core: add driver asynchronous probe support

2014-09-26 Thread Luis R. Rodriguez
From: "Luis R. Rodriguez" Some init systems may wish to express the desire to have device drivers run their device driver's bus probe() run asynchronously. This implements support for this and allows userspace to request async probe as a preference through a generic shared device driver module

[PATCH v1 5/5] driver-core: add driver asynchronous probe support

2014-09-26 Thread Luis R. Rodriguez
From: Luis R. Rodriguez mcg...@suse.com Some init systems may wish to express the desire to have device drivers run their device driver's bus probe() run asynchronously. This implements support for this and allows userspace to request async probe as a preference through a generic shared device