diff mbox

Intermittent delay when attaching SCSI devices

Message ID 98a6c588167c2cb1993eb7eeb4af01b4c89d1576.camel@wdc.com (mailing list archive)
State Not Applicable
Headers show

Commit Message

Bart Van Assche May 21, 2018, 5:18 p.m. UTC
On Mon, 2018-05-21 at 17:16 +0000, Calciano, Jess wrote:
> > Does the following patch help: "[PATCH] sd: Increase SCSI disk probing concurrency" 

> > (https://www.spinics.net/lists/linux-scsi/msg115657.html)?

> 

> The patch applied with no problems, but there's a compile error in scsi_pm.c. Is there maybe a prereq patch we need?

> I tried it against the latest from https://github.com/torvalds/linux (4.17.0_rc5+) as well as one of our internal test kernels (based on 4.17.0_rc1+), and both resulted in the same failure.

> 

> Here's the error:

> 

> # make rpm

> ...<snip>...

>   CC      drivers/scsi/scsi.o

>   CC      drivers/scsi/hosts.o

>   CC      drivers/scsi/scsi_ioctl.o

>   CC      drivers/scsi/scsicam.o

>   CC      drivers/scsi/scsi_error.o

>   CC      drivers/scsi/scsi_lib.o

>   CC      drivers/scsi/scsi_common.o

>   CC      drivers/scsi/constants.o

>   CC      drivers/scsi/scsi_lib_dma.o

>   CC      drivers/scsi/scsi_scan.o

>   CC      drivers/scsi/scsi_sysfs.o

>   CC      drivers/scsi/scsi_devinfo.o

>   CC      drivers/scsi/scsi_netlink.o

>   CC      drivers/scsi/scsi_sysctl.o

>   CC      drivers/scsi/scsi_proc.o

>   CC      drivers/scsi/scsi_debugfs.o

>   CC      drivers/scsi/scsi_trace.o

>   CC      drivers/scsi/scsi_logging.o

>   CC      drivers/scsi/scsi_pm.o

> drivers/scsi/scsi_pm.c: In function 'scsi_bus_prepare':

> drivers/scsi/scsi_pm.c:177:10: error: 'struct scsi_driver' has no member named 'sync'

>    if (drv->sync)

>           ^

> drivers/scsi/scsi_pm.c:178:7: error: 'struct scsi_driver' has no member named 'sync'

>     drv->sync(dev);

>        ^

> make[4]: *** [drivers/scsi/scsi_pm.o] Error 1

> make[3]: *** [drivers/scsi] Error 2

> make[2]: *** [drivers] Error 2

> error: Bad exit status from /var/tmp/rpm-tmp.xdBh56 (%build)

> 

> 

> RPM build errors:

>     Bad exit status from /var/tmp/rpm-tmp.xdBh56 (%build)

> make[1]: *** [rpm-pkg] Error 1

> make: *** [rpm-pkg] Error 2


Hello Jess,

Did you apply the entire patch? From the end of
https://www.spinics.net/lists/linux-scsi/msg115657.html:


Bart.

Comments

Calciano, Jess May 21, 2018, 5:57 p.m. UTC | #1
> Did you apply the entire patch? From the end of

> https://www.spinics.net/lists/linux-scsi/msg115657.html:

> ...


Actually... no. I copied the entire patch, but applied it from within drivers/scsi, so it skipped include/scsi/scsi_driver.h. Trying again with the entire set this time!

-- Jess
Calciano, Jess May 25, 2018, 7:42 p.m. UTC | #2
> Trying again with the entire set this time


Once I applied the entire patch, everything built just fine.
We've been using the patch for the last few days (verified that we are actually using it with an added printf in a log message), but unfortunately, we're still seeing the intermittent delay.

Any other ideas of things to try?

-- Jess
Bart Van Assche June 4, 2018, 7:09 a.m. UTC | #3
On Fri, 2018-05-25 at 19:42 +0000, Calciano, Jess wrote:
> > Trying again with the entire set this time

> 

> Once I applied the entire patch, everything built just fine.

> We've been using the patch for the last few days (verified that we are

> actually using it with an added printf in a log message), but

> unfortunately, we're still seeing the intermittent delay.

> 

> Any other ideas of things to try?


(back from traveling)

Hello Jess,

In a previous e-mail you wrote that you observe this behavior with kernel
versions >= 4.16. Does this mean that the delay in attaching does not occur
with previous kernel versions? If so, have you tried to perform a bisect?

Thanks,

Bart.
Calciano, Jess June 5, 2018, 8:12 p.m. UTC | #4
SGVsbG8gQmFydCwNCg0KPiBJbiBhIHByZXZpb3VzIGUtbWFpbCB5b3Ugd3JvdGUgdGhhdCB5b3Ug
b2JzZXJ2ZSB0aGlzIGJlaGF2aW9yIHdpdGgga2VybmVsIA0KPiB2ZXJzaW9ucyA+PSA0LjE2LiBE
b2VzIHRoaXMgbWVhbiB0aGF0IHRoZSBkZWxheSBpbiBhdHRhY2hpbmcgZG9lcyBub3Qgb2NjdXIg
DQo+IHdpdGggcHJldmlvdXMga2VybmVsIHZlcnNpb25zPw0KDQpDb3JyZWN0IC0gd2Ugc2VlIGl0
IGluIDQuMTYgYW5kIDQuMTcsIGJ1dCBub3QgaW4gNC4xNSBvciBlYXJsaWVyLg0KDQo+IElmIHNv
LCBoYXZlIHlvdSB0cmllZCB0byBwZXJmb3JtIGEgYmlzZWN0Pw0KDQpOb3QgeWV0LiBUaGF0IHdh
cyBnb2luZyB0byBiZSB0aGUgbmV4dCBzdGVwIChldmVudHVhbGx5KS4gQnV0IGJlZm9yZSBzdGFy
dGluZyB0aGF0LCB3ZSB3YW50ZWQgdG8gZmlyc3QgY2hlY2sgd2l0aCB0aGUgY29tbXVuaXR5IGFu
ZCBtYWtlIHN1cmUgdGhlcmUgd2VyZW4ndCBhbnkga25vd24gaXNzdWVzIG9yIGNoYW5nZXMgd2Ug
c2hvdWxkIGJlIGF3YXJlIG9mLg0KDQpUaGFua3MsDQpKZXNzDQoNCg0K
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Calciano, Jess June 26, 2018, 8:38 p.m. UTC | #5
SGVsbG8gQmFydCwNCg0KPiBoYXZlIHlvdSB0cmllZCB0byBwZXJmb3JtIGEgYmlzZWN0Pw0KDQpX
ZSBkaWQgZmluYWxseSBjb21wbGV0ZSB0aGUgYmlzZWN0LCB3aGljaCBsZWQgdG8gdGhpcyBjb21t
aXQ6DQojIGZpcnN0IGJhZCBjb21taXQ6IFtiYjRmNTUyYTU5OGQ0MDYyNDM0M2JjMDgxNWU1OTRl
ZmQ0ZDZlYzNkXSBNZXJnZSBicmFuY2ggJ2Zvci00LjE2LWNvbnNvbGUtd2FpdGVyLWxvZ2ljJyBp
bnRvIGZvci00LjE2DQoNClRoZSBjb21taXQgaGFzIHRvIGRvIHdpdGggcHJpbnRrLCBzbyBpdCBk
b2Vzbid0IHNlZW0gbGlrZSBhbiBvYnZpb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Qgc3Vy
ZSB0aGUgYmlzZWN0IGRlZmluaXRlbHkgcHJvdmVzIGFueXRoaW5nLCBJIHN0aWxsIHdhbnRlZCB0
byBmb2xsb3cgdXAgd2l0aCBvdXIgY29udGludWVkIG9ic2VydmF0aW9ucy4NCg0KDQpUaGFua3Ms
DQpKZXNzDQoNCg0K
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/include/scsi/scsi_driver.h b/include/scsi/scsi_driver.h
index fae8b465233e..78173b6d305a 100644
--- a/include/scsi/scsi_driver.h
+++ b/include/scsi/scsi_driver.h
@@ -12,6 +12,7 @@  struct scsi_device;
 struct scsi_driver {
 	struct device_driver	gendrv;
 
+	void (*sync)(struct device *);
 	void (*rescan)(struct device *);
 	int (*init_command)(struct scsi_cmnd *);
 	void (*uninit_command)(struct scsi_cmnd *);