mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Valdis.Kletnieks@vt.edu
To: Grant Likely <grant.likely@secretlab.ca>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Arnd Bergmann <arnd@arndb.de>,
	Greg Kroah-Hartman <greg@kroah.com>,
	Mark Brown <broonie@opensource.wolfsonmicro.com>,
	Manjunath GKondaiah <manjunath.gkondaiah@linaro.org>,
	linux-kernel@vger.kernel.org, Dilan Lee <dilee@nvidia.com>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [RFC PATCH v3] drivercore: Add driver probe deferral mechanism
Date: Fri, 23 Sep 2011 13:50:23 -0400	[thread overview]
Message-ID: <7790.1316800223@turing-police.cc.vt.edu> (raw)
In-Reply-To: Your message of "Thu, 22 Sep 2011 15:19:01 MDT." <CACxGe6vAQ+_SKc-zH434bdd3akM5S1jB0N7+AFEjgZfX1uNrZQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1309 bytes --]

On Thu, 22 Sep 2011 15:19:01 MDT, Grant Likely said:
> On Thu, Sep 22, 2011 at 2:29 PM, Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
> > Definitely what is needed for some of the x86 SoC stuff and would let us
> > rip out some of the special case magic for the SCU discovery.
> >
> > First thing that strikes me is driver_bound kicks the processing queue
> > again. That seems odd - surely this isn't needed because any driver that
> > does initialise this time and may allow something else to get going will
> > queue the kick itself. Thus this seems to just add overhead.
> >
> > It all looks a bit O(N²) if we don't expect the drivers that might
> > trigger something else binding to just say 'hey I'm one of the
> > troublemakers'
> 
> The way I read it, absolute worst case is when every device but one
> depends on another device.  In that case I believe it will be
> O(Nlog(N)).  (Every device gets probed on the first pass, but only the
> last one gets probed.  Then it goes through N-1 devices to the result
> of only 1 more device getting probed, then N-2, etc.). 

That is indeed O(N**2) not Nlog(N).  The total number of probes is (N+1)(N)/2
To get it to O(Nlog(N)), you'd have to probe N devices the first pass, N/2 devices
on the second pass, N/4 on the third, and so on.


[-- Attachment #2: Type: application/pgp-signature, Size: 227 bytes --]

  reply	other threads:[~2011-09-23 17:51 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-22 18:51 Grant Likely
2011-09-22 18:58 ` Joe Perches
2011-09-22 19:28 ` David Daney
2011-09-22 20:29 ` Alan Cox
2011-09-22 21:19   ` Grant Likely
2011-09-23 17:50     ` Valdis.Kletnieks [this message]
2011-09-23 23:18       ` Grant Likely
2011-09-22 21:19   ` David Daney
2011-09-22 22:47     ` Alan Cox
2011-09-23  5:02       ` Grant Likely
2011-09-23 16:55       ` David Daney
2011-09-26 14:16 ` Mark Brown
2011-09-26 15:12   ` Russell King - ARM Linux
2011-09-26 15:26     ` Mark Brown
2011-09-26 15:48       ` Grant Likely
2011-09-27 13:50         ` Arnd Bergmann
2011-09-27 21:08           ` Grant Likely
2011-09-27 22:13             ` Mark Brown
2011-09-28 13:04               ` Arnd Bergmann
2011-09-28 13:20                 ` Mark Brown
2011-09-28 23:14               ` Grant Likely
2011-09-29 11:00                 ` Mark Brown
2011-10-03 23:02 ` Kevin Hilman
2011-10-04 15:52   ` Grant Likely
2011-10-04 14:51 ` G, Manjunath Kondaiah
2011-10-04 15:58   ` Grant Likely
2011-10-04 18:35     ` G, Manjunath Kondaiah
2011-10-04 23:35       ` Grant Likely
2011-10-07  3:31         ` G, Manjunath Kondaiah
2011-10-11 20:47 ` Andrew Morton
2011-10-11 21:07   ` David Daney
2011-10-13  4:19     ` Grant Likely

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=7790.1316800223@turing-police.cc.vt.edu \
    --to=valdis.kletnieks@vt.edu \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=arnd@arndb.de \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=dilee@nvidia.com \
    --cc=grant.likely@secretlab.ca \
    --cc=greg@kroah.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manjunath.gkondaiah@linaro.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®