On 4/30/19 11:39 PM, Bart Van Assche wrote:
As explained during the 2018 LSF/MM session about increasing SCSI disk
probing concurrency, the problems with the current probing approach are as
follows:
- The driver core is unaware of asynchronous SCSI LUN probing.
wait_for_device_probe() waits for all asynchronous probes except
asynchronous SCSI disk probes.
- There is unnecessary serialization between sd_probe() and sd_remove().
This can lead to a deadlock.
Hence this patch that modifies the sd driver such that it uses the driver
core framework for asynchronous probing. The async domain and
get_device()/put_device() pairs that became superfluous due to this change
are removed.
This patch does not affect the time needed for loading the scsi_debug
kernel module with parameters delay=0 and max_luns=256.
This patch depends on commit ef0ff68351be ("driver core: Probe devices
asynchronously instead of the driver") that went upstream in kernel version
v5.1-rc1.
Cc: Lee Duncan <ldun...@suse.com>
Cc: Hannes Reinecke <h...@suse.com>
Cc: Luis Chamberlain <mcg...@kernel.org>
Cc: Johannes Thumshirn <jthumsh...@suse.de>
Cc: Christoph Hellwig <h...@lst.de>
Cc: Pavel Machek <pa...@ucw.cz>
Cc: Dan Williams <dan.j.willi...@intel.com>
Signed-off-by: Bart Van Assche <bvanass...@acm.org>
---
drivers/scsi/scsi.c | 12 +++---------
drivers/scsi/scsi_pm.c | 6 +-----
drivers/scsi/scsi_priv.h | 1 -
drivers/scsi/sd.c | 12 +++---------
4 files changed, 7 insertions(+), 24 deletions(-)
Reviewed-by: Hannes Reinecke <h...@suse.com>
Cheers,
Hannes