linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHv4 0/9] New EH command timeout handler
@ 2013-08-29 13:32 Hannes Reinecke
  2013-08-29 13:32 ` [PATCH 1/9] scsi: Fix erratic device offline during EH Hannes Reinecke
                   ` (8 more replies)
  0 siblings, 9 replies; 14+ messages in thread
From: Hannes Reinecke @ 2013-08-29 13:32 UTC (permalink / raw)
  To: James Bottomley
  Cc: linux-scsi, Ewan Milne, Ren Mingxin, Joern Engel, James Smart,
	Bart Van Assche, Roland Dreier, Hannes Reinecke

his patchset implements a new SCSI EH command timeout handler
which will be sending command aborts inline without actually
engaging SCSI EH.
SCSI EH will only be invoked if command abort fails.

In addition the commands will be returned directly
if the command abort succeeded, cutting down recovery
times dramatically.

With the original SCSI EH I got:
# time dd if=/dev/zero of=/dev/dm-2 bs=4k count=4k oflag=direct
4096+0 records in
4096+0 records out
16777216 bytes (17 MB) copied, 142.652 s, 118 kB/s

real	2m22.657s
user	0m0.013s
sys	0m0.145s

With this patchset I got:
# time dd if=/dev/zero of=/dev/dm-2 bs=4k count=4k oflag=direct
4096+0 records in
4096+0 records out
16777216 bytes (17 MB) copied, 52.1579 s, 322 kB/s

real	0m52.163s
user	0m0.012s
sys	0m0.145s

Test was to disable RSCN on the target port, disable the
target port, and then start the 'dd' command as indicated.

Changes to the original version:
- Use a private list in scsi_eh_abort_handler to avoid
  list starvation (pointed out by Joern Engel)
- Terminate command aborts when the first abort fails
- Do not attempt command aborts if the host is already in recovery
  or if the device is removed.
- Flush abort workqueue if the device is removed.

Changes to v2:
- Removed eh_entry initialisation
- Convert to per-command workqueue

Changes to v3:
- Use delayed_work
- Enable new eh timeout handler for virtio, SAS, and FC
- Modify logging messages to include scmd pointer

Hannes Reinecke (9):
  scsi: Fix erratic device offline during EH
  blk-timeout: add BLK_EH_SCHEDULED return code
  scsi: improved eh timeout handler
  virtio_scsi: Enable new EH timeout handler
  libsas: Enable new EH timeout handler
  mptsas: Enable new EH timeout handler
  mpt2sas: Enable new EH timeout handler
  mpt3sas: Enable new EH timeout handler
  scsi_transport_fc: Enable new EH timeout handler

 drivers/message/fusion/mptsas.c      |   3 +-
 drivers/message/fusion/mptscsih.c    |   7 ++
 drivers/message/fusion/mptscsih.h    |   1 +
 drivers/scsi/libsas/sas_scsi_host.c  |   2 +-
 drivers/scsi/mpt2sas/mpt2sas_scsih.c |  13 ++-
 drivers/scsi/mpt3sas/mpt3sas_scsih.c |  11 +++
 drivers/scsi/scsi.c                  |   3 +
 drivers/scsi/scsi_error.c            | 178 ++++++++++++++++++++++++++++++-----
 drivers/scsi/scsi_priv.h             |   2 +
 drivers/scsi/scsi_transport_fc.c     |   2 +-
 drivers/scsi/virtio_scsi.c           |   8 ++
 include/linux/blkdev.h               |   1 +
 include/scsi/scsi_cmnd.h             |   2 +
 13 files changed, 207 insertions(+), 26 deletions(-)

-- 
1.7.12.4


^ permalink raw reply	[flat|nested] 14+ messages in thread
* [PATCHv5 0/9] New EH command timeout handler
@ 2013-09-02  7:12 Hannes Reinecke
  2013-09-02  7:13 ` [PATCH 6/9] mptsas: Enable new EH " Hannes Reinecke
  0 siblings, 1 reply; 14+ messages in thread
From: Hannes Reinecke @ 2013-09-02  7:12 UTC (permalink / raw)
  To: James Bottomley
  Cc: linux-scsi, Ewan Milne, Ren Mingxin, Joern Engel, James Smart,
	Bart Van Assche, Roland Dreier, Hannes Reinecke

Hi all,

this patchset implements a new SCSI EH command timeout handler
which will be sending command aborts inline without actually
engaging SCSI EH.
SCSI EH will only be invoked if command abort fails.

In addition the commands will be returned directly
if the command abort succeeded, cutting down recovery
times dramatically.

With the original SCSI EH I got:
# time dd if=/dev/zero of=/dev/dm-2 bs=4k count=4k oflag=direct
4096+0 records in
4096+0 records out
16777216 bytes (17 MB) copied, 142.652 s, 118 kB/s

real	2m22.657s
user	0m0.013s
sys	0m0.145s

With this patchset I got:
# time dd if=/dev/zero of=/dev/dm-2 bs=4k count=4k oflag=direct
4096+0 records in
4096+0 records out
16777216 bytes (17 MB) copied, 52.1579 s, 322 kB/s

real	0m52.163s
user	0m0.012s
sys	0m0.145s

Test was to disable RSCN on the target port, disable the
target port, and then start the 'dd' command as indicated.

Changes to the original version:
- Use a private list in scsi_eh_abort_handler to avoid
  list starvation (pointed out by Joern Engel)
- Terminate command aborts when the first abort fails
- Do not attempt command aborts if the host is already in recovery
  or if the device is removed.
- Flush abort workqueue if the device is removed.

Changes to v2:
- Removed eh_entry initialisation
- Convert to per-command workqueue

Changes to v3:
- Use delayed_work
- Enable new eh timeout handler for virtio, SAS, and FC
- Modify logging messages to include scmd pointer

Changes to v4:
- Remove stubs when enabling new eh timeout handler
  for other drivers

Hannes Reinecke (9):
  scsi: Fix erratic device offline during EH
  blk-timeout: add BLK_EH_SCHEDULED return code
  scsi: improved eh timeout handler
  virtio_scsi: Enable new EH timeout handler
  libsas: Enable new EH timeout handler
  mptsas: Enable new EH timeout handler
  mpt2sas: Enable new EH timeout handler
  mpt3sas: Enable new EH timeout handler
  scsi_transport_fc: Enable new EH timeout handler

 drivers/message/fusion/mptsas.c      |   3 +-
 drivers/scsi/libsas/sas_scsi_host.c  |   2 +-
 drivers/scsi/mpt2sas/mpt2sas_scsih.c |   3 +-
 drivers/scsi/mpt3sas/mpt3sas_scsih.c |   1 +
 drivers/scsi/scsi.c                  |   3 +
 drivers/scsi/scsi_error.c            | 178 ++++++++++++++++++++++++++++++-----
 drivers/scsi/scsi_priv.h             |   2 +
 drivers/scsi/scsi_transport_fc.c     |   2 +-
 drivers/scsi/virtio_scsi.c           |   2 +
 include/linux/blkdev.h               |   1 +
 include/scsi/scsi_cmnd.h             |   2 +
 11 files changed, 173 insertions(+), 26 deletions(-)

-- 
1.7.12.4


^ permalink raw reply	[flat|nested] 14+ messages in thread
* [PATCHv3 0/9] New EH command timeout handler
@ 2013-07-01 14:24 Hannes Reinecke
  2013-07-01 14:24 ` [PATCH 6/9] mptsas: Enable new EH " Hannes Reinecke
  0 siblings, 1 reply; 14+ messages in thread
From: Hannes Reinecke @ 2013-07-01 14:24 UTC (permalink / raw)
  To: James Bottomley
  Cc: linux-scsi, Ewan Milne, Ren Mingxin, Bart van Assche, Joern Engel,
	James Smart, Roland Dreier, Hannes Reinecke

This patchset implements a new SCSI EH command timeout handler
which will be sending command aborts inline without actually
engaging SCSI EH.
SCSI EH will only be invoked if command abort fails.

In addition the commands will be returned directly
if the command abort succeeded, cutting down recovery
times dramatically.

With the original SCSI EH I got:
# time dd if=/dev/zero of=/dev/dm-2 bs=4k count=4k oflag=direct
4096+0 records in
4096+0 records out
16777216 bytes (17 MB) copied, 142.652 s, 118 kB/s

real	2m22.657s
user	0m0.013s
sys	0m0.145s

With this patchset I got:
# time dd if=/dev/zero of=/dev/dm-2 bs=4k count=4k oflag=direct
4096+0 records in
4096+0 records out
16777216 bytes (17 MB) copied, 52.1579 s, 322 kB/s

real	0m52.163s
user	0m0.012s
sys	0m0.145s

Test was to disable RSCN on the target port, disable the
target port, and then start the 'dd' command as indicated.

As a proof-of-concept I've also enabled the new timeout
handler for virtio, so that things can be tested out
more easily.
As requested I've also hooked in the new SCSI timeout
handler to SAS.

Changes to the original version:
- Use a private list in scsi_eh_abort_handler to avoid
  list starvation (pointed out by Joern Engel)
- Terminate command aborts when the first abort fails
- Do not attempt command aborts if the host is already in recovery
  or if the device is removed.
- Flush abort workqueue if the device is removed.

Changes to v2:
- Removed eh_entry initialisation
- Convert to per-command workqueue

Comments etc are welcome.


Hannes Reinecke (9):
  scsi: Fix erratic device offline during EH
  blk-timeout: add BLK_EH_SCHEDULED return code
  scsi: improved eh timeout handler
  virtio_scsi: Enable new EH timeout handler
  libsas: Enable new EH timeout handler
  mptsas: Enable new EH timeout handler
  mpt2sas: Enable new EH timeout handler
  mpt3sas: Enable new EH timeout handler
  scsi_transport_fc: Enable new EH timeout handler

 drivers/message/fusion/mptsas.c      |   3 +-
 drivers/message/fusion/mptscsih.c    |   7 ++
 drivers/message/fusion/mptscsih.h    |   1 +
 drivers/scsi/libsas/sas_scsi_host.c  |   2 +-
 drivers/scsi/mpt2sas/mpt2sas_scsih.c |  13 ++-
 drivers/scsi/mpt3sas/mpt3sas_scsih.c |  11 +++
 drivers/scsi/scsi.c                  |   1 +
 drivers/scsi/scsi_error.c            | 171 ++++++++++++++++++++++++++++++-----
 drivers/scsi/scsi_priv.h             |   2 +
 drivers/scsi/scsi_transport_fc.c     |   2 +-
 drivers/scsi/virtio_scsi.c           |   8 ++
 include/linux/blkdev.h               |   1 +
 include/scsi/scsi_cmnd.h             |   2 +
 13 files changed, 199 insertions(+), 25 deletions(-)

-- 
1.7.12.4


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2013-09-02  7:13 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-29 13:32 [PATCHv4 0/9] New EH command timeout handler Hannes Reinecke
2013-08-29 13:32 ` [PATCH 1/9] scsi: Fix erratic device offline during EH Hannes Reinecke
2013-08-29 13:32 ` [PATCH 2/9] blk-timeout: add BLK_EH_SCHEDULED return code Hannes Reinecke
2013-08-29 13:32 ` [PATCH 3/9] scsi: improved eh timeout handler Hannes Reinecke
2013-08-29 13:32 ` [PATCH 4/9] virtio_scsi: Enable new EH " Hannes Reinecke
2013-08-30 12:45   ` Christoph Hellwig
2013-08-30 12:47     ` Hannes Reinecke
2013-08-29 13:32 ` [PATCH 5/9] libsas: " Hannes Reinecke
2013-08-29 13:32 ` [PATCH 6/9] mptsas: " Hannes Reinecke
2013-08-29 13:32 ` [PATCH 7/9] mpt2sas: " Hannes Reinecke
2013-08-29 13:32 ` [PATCH 8/9] mpt3sas: " Hannes Reinecke
2013-08-29 13:32 ` [PATCH 9/9] scsi_transport_fc: " Hannes Reinecke
  -- strict thread matches above, loose matches on Subject: below --
2013-09-02  7:12 [PATCHv5 0/9] New EH command " Hannes Reinecke
2013-09-02  7:13 ` [PATCH 6/9] mptsas: Enable new EH " Hannes Reinecke
2013-07-01 14:24 [PATCHv3 0/9] New EH command " Hannes Reinecke
2013-07-01 14:24 ` [PATCH 6/9] mptsas: Enable new EH " Hannes Reinecke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).