linux/drivers/base
Alexander Duyck 9925aa5542 UPSTREAM: driver core: Probe devices asynchronously instead of the driver
Probe devices asynchronously instead of the driver. This results in us
seeing the same behavior if the device is registered before the driver or
after. This way we can avoid serializing the initialization should the
driver not be loaded until after the devices have already been added.

The motivation behind this is that if we have a set of devices that
take a significant amount of time to load we can greatly reduce the time to
load by processing them in parallel instead of one at a time. In addition,
each device can exist on a different node so placing a single thread on one
CPU to initialize all of the devices for a given driver can result in poor
performance on a system with multiple nodes.

This approach can reduce the time needed to scan SCSI LUNs significantly.
The only way to realize that speedup is by enabling more concurrency which
is what is achieved with this patch.

To achieve this it was necessary to add a new member "async_driver" to the
device_private structure to store the driver pointer while we wait on the
deferred probe call.

Change-Id: I08edadd321d483facd62ed913d17bd79813e66d9
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Alexander Duyck <alexander.h.duyck@linux.intel.com>
Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit ef0ff68351)
2020-03-23 10:28:09 +08:00
..
firmware_loader FROMGIT: firmware_class: make firmware caching configurable 2019-11-27 21:40:15 +00:00
memory_group_manager
power Merge remote branch 'android-4.19' of https://android.googlesource.com/kernel/common 2020-03-21 19:46:46 +08:00
regmap
test
arch_topology.c
attribute_container.c
base.h UPSTREAM: driver core: Probe devices asynchronously instead of the driver 2020-03-23 10:28:09 +08:00
bus.c UPSTREAM: driver core: Probe devices asynchronously instead of the driver 2020-03-23 10:28:09 +08:00
cacheinfo.c
class.c
component.c component: do not dereference opaque pointer in debugfs 2020-02-01 09:37:03 +00:00
container.c
core.c FROMGIT: driver core: Reevaluate dev->links.need_for_probe as suppliers are added 2020-03-10 00:31:34 +00:00
cpu.c This is the 4.19.84 stable release 2019-11-14 14:15:21 +08:00
dd.c UPSTREAM: driver core: Probe devices asynchronously instead of the driver 2020-03-23 10:28:09 +08:00
devcon.c
devcoredump.c
devres.c
devtmpfs.c
driver.c
firmware.c
hypervisor.c
init.c
isa.c
Kconfig Merge remote branch 'android-4.19' of https://android.googlesource.com/kernel/common 2019-10-28 20:26:28 +08:00
Makefile
map.c
memory.c mm/memory_hotplug: fix try_offline_node() 2020-01-29 16:43:27 +01:00
module.c
node.c This is the 4.19.100 stable release 2020-01-29 17:10:45 +01:00
pinctrl.c
platform-msi.c
platform.c Merge remote branch 'android-4.19' of https://android.googlesource.com/kernel/common 2020-03-21 19:46:46 +08:00
property.c
soc.c
syscore.c
topology.c
transport_class.c