On 1/11/19 1:08 AM, Bart Van Assche wrote:
As explained during the 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 domains
and get_device()/put_device() pairs that became superfluous due to
this change are removed.
This patch reduces the time needed for loading the scsi_debug kernel
module with parameters delay=0 and max_luns=256 from 0.7s to 0.1s. In
other words, this specific test runs about seven times faster.
See also commit 3c31b52f96f7 ("scsi: async sd resume").
Cc: Lee Duncan <[email protected]>
Cc: Hannes Reinecke <[email protected]>
Cc: Luis Chamberlain <[email protected]>
Cc: Johannes Thumshirn <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Dan Williams <[email protected]>
Signed-off-by: Bart Van Assche <[email protected]>
---
drivers/scsi/scsi.c | 14 --------------
drivers/scsi/scsi_pm.c | 22 ++--------------------
drivers/scsi/scsi_priv.h | 3 ---
drivers/scsi/sd.c | 13 +++----------
4 files changed, 5 insertions(+), 47 deletions(-)
Very nice.
Could you please check if this depends on any changes to the async
probing mechanism?
IOW, can it be backported? If so, which version would be the earliest one?
Other than that:
Reviewed-by: Hannes Reinecke <[email protected]>
Cheers,
Hannes
--
Dr. Hannes Reinecke Teamlead Storage & Networking
[email protected] +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)