From: "Luis R. Rodriguez" <mcgrof@suse.com>
To: Yuval Mintz <Yuval.Mintz@qlogic.com>
Cc: "Luis R. Rodriguez" <mcgrof@do-not-panic.com>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>,
Joseph Salisbury <joseph.salisbury@canonical.com>,
Kay Sievers <kay@vrfy.org>,
One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>,
Tim Gardner <tim.gardner@canonical.com>,
Pierre Fersing <pierre-fersing@pierref.org>,
Andrew Morton <akpm@linux-foundation.org>,
Oleg Nesterov <oleg@redhat.com>,
Benjamin Poirier <bpoirier@suse.de>,
Nagalakshmi Nandigama <nagalakshmi.nandigama@avagotech.com>,
Praveen Krishnamoorthy <praveen.krishnamoorthy@avagotech.com>,
Sreekanth Reddy <sreekanth.reddy@avagotech.com>,
Abhijit Mahajan <abhijit.mahajan@avagotech.com>,
Hariprasad S <hariprasad@chelsio.com>,
Santosh Rastapur <santosh@chelsio.com>,
"MPT-FusionLinux.pdl@avagotech.com" <MPT-Fusi>
Subject: Re: [PATCH 1/3] driver core: enable drivers to use deferred probe from init
Date: Mon, 28 Jul 2014 20:48:58 +0200 [thread overview]
Message-ID: <20140728184858.GK21930@wotan.suse.de> (raw)
In-Reply-To: <B5657A6538887040AD3A81F1008BEC63B07066@avmb3.qlogic.org>
On Mon, Jul 28, 2014 at 06:30:29PM +0000, Yuval Mintz wrote:
> > On Mon, Jul 28, 2014 at 06:52:48PM +0200, Luis R. Rodriguez wrote:
> > > On Mon, Jul 28, 2014 at 03:46:32PM +0000, Yuval Mintz wrote:
> > > > Sorry for not being clear, but I didn't meant 'what guarantees that the device
> > > > will be added to the deferred probe', but rather what guarantees that the
> > > > deferred workqueue will be scheduled.
> > > >
> > > > To the best of my knowledge the deferring mechanism works only if one device
> > > > is dependent upon another, e.g., for Multi-function devices where one device
> > > > probe is dependent upon the others - which are soon-to-be probed.
> > >
> > > The workqueue will be kicked when driver_deferred_probe_trigger() gets
> > > poked, we do that in the late_initcall(deferred_probe_initcall), it
> > > also gets flushed there with a flush_workqueue(deferred_wq).
>
> > But come to think of it that will work well for devices already plugged in
> > so indeed I think that driver_deferred_probe_add() needs a check added
> > for for if (!driver_deferred_probe_enable) then we have to
> > driver_deferred_probe_trigger(). The driver_deferred_probe_enable is set
> > to false upon init, but later on late init it gets set to true so with
> > that check we'd only generate the trigger after late init call.
>
> > I can fold that in the v2.
>
> > Luis
>
> But what about modules being added after the init-calls? If they try try to use this
> mechanism, what guarantees they'll eventually get probed?
bus_probe_device --> device_attach() -->
__device_attach() --> driver_probe_device() -->
__driver_probe_device() --> driver_deferred_probe_add()
And with the new hunk I mentioned I'd add then we'd trigger the
workqueue if its after late init. The change is in v2 series.
Luis
WARNING: multiple messages have this Message-ID (diff)
From: "Luis R. Rodriguez" <mcgrof@suse.com>
To: Yuval Mintz <Yuval.Mintz@qlogic.com>
Cc: "Luis R. Rodriguez" <mcgrof@do-not-panic.com>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>,
Joseph Salisbury <joseph.salisbury@canonical.com>,
Kay Sievers <kay@vrfy.org>,
One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>,
Tim Gardner <tim.gardner@canonical.com>,
Pierre Fersing <pierre-fersing@pierref.org>,
Andrew Morton <akpm@linux-foundation.org>,
Oleg Nesterov <oleg@redhat.com>,
Benjamin Poirier <bpoirier@suse.de>,
Nagalakshmi Nandigama <nagalakshmi.nandigama@avagotech.com>,
Praveen Krishnamoorthy <praveen.krishnamoorthy@avagotech.com>,
Sreekanth Reddy <sreekanth.reddy@avagotech.com>,
Abhijit Mahajan <abhijit.mahajan@avagotech.com>,
Hariprasad S <hariprasad@chelsio.com>,
Santosh Rastapur <santosh@chelsio.com>,
"MPT-FusionLinux.pdl@avagotech.com"
<MPT-FusionLinux.pdl@avagotech.com>,
linux-scsi <linux-scsi@vger.kernel.org>,
netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH 1/3] driver core: enable drivers to use deferred probe from init
Date: Mon, 28 Jul 2014 20:48:58 +0200 [thread overview]
Message-ID: <20140728184858.GK21930@wotan.suse.de> (raw)
In-Reply-To: <B5657A6538887040AD3A81F1008BEC63B07066@avmb3.qlogic.org>
On Mon, Jul 28, 2014 at 06:30:29PM +0000, Yuval Mintz wrote:
> > On Mon, Jul 28, 2014 at 06:52:48PM +0200, Luis R. Rodriguez wrote:
> > > On Mon, Jul 28, 2014 at 03:46:32PM +0000, Yuval Mintz wrote:
> > > > Sorry for not being clear, but I didn't meant 'what guarantees that the device
> > > > will be added to the deferred probe', but rather what guarantees that the
> > > > deferred workqueue will be scheduled.
> > > >
> > > > To the best of my knowledge the deferring mechanism works only if one device
> > > > is dependent upon another, e.g., for Multi-function devices where one device
> > > > probe is dependent upon the others - which are soon-to-be probed.
> > >
> > > The workqueue will be kicked when driver_deferred_probe_trigger() gets
> > > poked, we do that in the late_initcall(deferred_probe_initcall), it
> > > also gets flushed there with a flush_workqueue(deferred_wq).
>
> > But come to think of it that will work well for devices already plugged in
> > so indeed I think that driver_deferred_probe_add() needs a check added
> > for for if (!driver_deferred_probe_enable) then we have to
> > driver_deferred_probe_trigger(). The driver_deferred_probe_enable is set
> > to false upon init, but later on late init it gets set to true so with
> > that check we'd only generate the trigger after late init call.
>
> > I can fold that in the v2.
>
> > Luis
>
> But what about modules being added after the init-calls? If they try try to use this
> mechanism, what guarantees they'll eventually get probed?
bus_probe_device --> device_attach() -->
__device_attach() --> driver_probe_device() -->
__driver_probe_device() --> driver_deferred_probe_add()
And with the new hunk I mentioned I'd add then we'd trigger the
workqueue if its after late init. The change is in v2 series.
Luis
WARNING: multiple messages have this Message-ID (diff)
From: "Luis R. Rodriguez" <mcgrof@suse.com>
To: Yuval Mintz <Yuval.Mintz@qlogic.com>
Cc: "Luis R. Rodriguez" <mcgrof@do-not-panic.com>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>,
Joseph Salisbury <joseph.salisbury@canonical.com>,
Kay Sievers <kay@vrfy.org>,
One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>,
Tim Gardner <tim.gardner@canonical.com>,
Pierre Fersing <pierre-fersing@pierref.org>,
Andrew Morton <akpm@linux-foundation.org>,
Oleg Nesterov <oleg@redhat.com>,
Benjamin Poirier <bpoirier@suse.de>,
Nagalakshmi Nandigama <nagalakshmi.nandigama@avagotech.com>,
Praveen Krishnamoorthy <praveen.krishnamoorthy@avagotech.com>,
Sreekanth Reddy <sreekanth.reddy@avagotech.com>,
Abhijit Mahajan <abhijit.mahajan@avagotech.com>,
Hariprasad S <hariprasad@chelsio.com>,
Santosh Rastapur <santosh@chelsio.com>,
"MPT-FusionLinux.pdl@avagotech.com" <MPT-Fusi
Subject: Re: [PATCH 1/3] driver core: enable drivers to use deferred probe from init
Date: Mon, 28 Jul 2014 20:48:58 +0200 [thread overview]
Message-ID: <20140728184858.GK21930@wotan.suse.de> (raw)
In-Reply-To: <B5657A6538887040AD3A81F1008BEC63B07066@avmb3.qlogic.org>
On Mon, Jul 28, 2014 at 06:30:29PM +0000, Yuval Mintz wrote:
> > On Mon, Jul 28, 2014 at 06:52:48PM +0200, Luis R. Rodriguez wrote:
> > > On Mon, Jul 28, 2014 at 03:46:32PM +0000, Yuval Mintz wrote:
> > > > Sorry for not being clear, but I didn't meant 'what guarantees that the device
> > > > will be added to the deferred probe', but rather what guarantees that the
> > > > deferred workqueue will be scheduled.
> > > >
> > > > To the best of my knowledge the deferring mechanism works only if one device
> > > > is dependent upon another, e.g., for Multi-function devices where one device
> > > > probe is dependent upon the others - which are soon-to-be probed.
> > >
> > > The workqueue will be kicked when driver_deferred_probe_trigger() gets
> > > poked, we do that in the late_initcall(deferred_probe_initcall), it
> > > also gets flushed there with a flush_workqueue(deferred_wq).
>
> > But come to think of it that will work well for devices already plugged in
> > so indeed I think that driver_deferred_probe_add() needs a check added
> > for for if (!driver_deferred_probe_enable) then we have to
> > driver_deferred_probe_trigger(). The driver_deferred_probe_enable is set
> > to false upon init, but later on late init it gets set to true so with
> > that check we'd only generate the trigger after late init call.
>
> > I can fold that in the v2.
>
> > Luis
>
> But what about modules being added after the init-calls? If they try try to use this
> mechanism, what guarantees they'll eventually get probed?
bus_probe_device --> device_attach() -->
__device_attach() --> driver_probe_device() -->
__driver_probe_device() --> driver_deferred_probe_add()
And with the new hunk I mentioned I'd add then we'd trigger the
workqueue if its after late init. The change is in v2 series.
Luis
next prev parent reply other threads:[~2014-07-28 18:49 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-28 14:34 [PATCH 1/3] driver core: enable drivers to use deferred probe from init Luis R. Rodriguez
2014-07-28 14:34 ` [PATCH 2/3] cxgb4: ask for deferred probe Luis R. Rodriguez
2014-07-28 14:34 ` [PATCH 3/3] mptsas: " Luis R. Rodriguez
2014-07-28 14:51 ` [PATCH 1/3] driver core: enable drivers to use deferred probe from init Takashi Iwai
2014-07-28 15:01 ` Luis R. Rodriguez
2014-07-28 15:01 ` Luis R. Rodriguez
2014-07-28 15:12 ` Yuval Mintz
2014-07-28 15:12 ` Yuval Mintz
2014-07-28 15:12 ` Yuval Mintz
2014-07-28 15:38 ` Luis R. Rodriguez
2014-07-28 15:38 ` Luis R. Rodriguez
2014-07-28 15:38 ` Luis R. Rodriguez
2014-07-28 15:46 ` Yuval Mintz
2014-07-28 15:46 ` Yuval Mintz
2014-07-28 15:46 ` Yuval Mintz
2014-07-28 16:52 ` Luis R. Rodriguez
2014-07-28 16:52 ` Luis R. Rodriguez
2014-07-28 16:52 ` Luis R. Rodriguez
2014-07-28 16:59 ` Luis R. Rodriguez
2014-07-28 16:59 ` Luis R. Rodriguez
2014-07-28 16:59 ` Luis R. Rodriguez
2014-07-28 18:30 ` Yuval Mintz
2014-07-28 18:30 ` Yuval Mintz
2014-07-28 18:30 ` Yuval Mintz
2014-07-28 18:48 ` Luis R. Rodriguez [this message]
2014-07-28 18:48 ` Luis R. Rodriguez
2014-07-28 18:48 ` Luis R. Rodriguez
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140728184858.GK21930@wotan.suse.de \
--to=mcgrof@suse.com \
--cc=Yuval.Mintz@qlogic.com \
--cc=abhijit.mahajan@avagotech.com \
--cc=akpm@linux-foundation.org \
--cc=bpoirier@suse.de \
--cc=gnomes@lxorguk.ukuu.org.uk \
--cc=gregkh@linuxfoundation.org \
--cc=hariprasad@chelsio.com \
--cc=joseph.salisbury@canonical.com \
--cc=kay@vrfy.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mcgrof@do-not-panic.com \
--cc=nagalakshmi.nandigama@avagotech.com \
--cc=oleg@redhat.com \
--cc=penguin-kernel@I-love.SAKURA.ne.jp \
--cc=pierre-fersing@pierref.org \
--cc=praveen.krishnamoorthy@avagotech.com \
--cc=santosh@chelsio.com \
--cc=sreekanth.reddy@avagotech.com \
--cc=tim.gardner@canonical.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.