public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Cornelia Huck <cornelia.huck@de.ibm.com>
To: tom.leiming@gmail.com
Cc: kay.sievers@vrfy.org, greg@kroah.com,
	linux-kernel@vger.kernel.org, arjan@linux.intel.com,
	Ming Lei <tom.leiming@gmail.com>
Subject: Re: [PATCH] driver core: check bus->match without holding device lock(v2)
Date: Wed, 21 Jan 2009 16:59:41 +0100	[thread overview]
Message-ID: <20090121165941.00428154@gondolin> (raw)
In-Reply-To: <1232551667-4829-1-git-send-email-tom.leiming@gmail.com>

On Wed, 21 Jan 2009 23:27:47 +0800,
tom.leiming@gmail.com wrote:

> From: Ming Lei <tom.leiming@gmail.com>
> 
> This patch moves bus->match out from driver_probe_device and
> does not hold device lock to check the match between a device
> and a driver.
> 
> The idea has been verified by the commit 6cd495860901,
> which leads to a faster boot. But the commit 6cd495860901 has
> the following drawbacks: 1),only does the quick check in
> the path of __driver_attach->driver_probe_device, not in other
> paths; 2),for a matched device and driver, check the same match
> twice. It is a waste of cpu ,especially for some drivers with long
> device id table (eg. usb-storage driver).
> 
> This patch adds a helper of driver_match_device to check the match
> in all paths, and testes the match only once.
> 
> Signed-off-by: Ming Lei <tom.leiming@gmail.com>
> ---
>  drivers/base/base.h |    5 +++++
>  drivers/base/bus.c  |    2 +-
>  drivers/base/dd.c   |   19 +++++++------------
>  3 files changed, 13 insertions(+), 13 deletions(-)

The patch looks fine to me, and it seems to work well on my s390 LPAR.

Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>

  reply	other threads:[~2009-01-21 15:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-21 15:27 [PATCH] driver core: check bus->match without holding device lock(v2) tom.leiming
2009-01-21 15:59 ` Cornelia Huck [this message]
2009-04-10 15:31 ` Andreas Schwab
2009-04-11  1:52   ` Ming Lei

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=20090121165941.00428154@gondolin \
    --to=cornelia.huck@de.ibm.com \
    --cc=arjan@linux.intel.com \
    --cc=greg@kroah.com \
    --cc=kay.sievers@vrfy.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tom.leiming@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox