linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHv10 0/5] New EH command timeout handler
@ 2013-11-05  7:05 Hannes Reinecke
  2013-11-05  7:05 ` [PATCH 1/5] scsi: Fix erratic device offline during EH Hannes Reinecke
                   ` (4 more replies)
  0 siblings, 5 replies; 21+ messages in thread
From: Hannes Reinecke @ 2013-11-05  7:05 UTC (permalink / raw)
  To: James Bottomley
  Cc: Christoph Hellwig, linux-scsi, Ren Mingxin, Joern Engel,
	James Smart, 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

Changes to v5:
- Enable new eh timeout handler per default
- Update documentation

Changes to v6:
- Include changes from James Bottomley for erratic device
  offline patch
- Rearrange patches
- Update SCSI midlayer documentation

Changes to v7:
- Merge obsolete patch

Changes to v8:
- Include fixes from hch
- Include patch from Ren Mingxin to set eh_deadline to '0'

Changes to v9:
- Unlock accesses to eh_deadline

Hannes Reinecke (3):
  scsi: improved eh timeout handler
  scsi: Unlock accesses to eh_deadline
  scsi: Update documentation

James Bottomley (1):
  scsi: Fix erratic device offline during EH

Ren Mingxin (1):
  scsi: Set the minimum valid value of 'eh_deadline' as 0

 Documentation/scsi/scsi_eh.txt          |  69 +++++-----
 Documentation/scsi/scsi_mid_low_api.txt |   9 +-
 drivers/scsi/hosts.c                    |  16 ++-
 drivers/scsi/scsi.c                     |   9 +-
 drivers/scsi/scsi_error.c               | 229 ++++++++++++++++++++++++--------
 drivers/scsi/scsi_priv.h                |   2 +
 drivers/scsi/scsi_sysfs.c               |  36 +++--
 drivers/scsi/sd.c                       |  26 ++--
 include/scsi/scsi_cmnd.h                |   1 +
 include/scsi/scsi_driver.h              |   2 +-
 include/scsi/scsi_host.h                |   5 +
 11 files changed, 281 insertions(+), 123 deletions(-)

-- 
1.7.12.4


^ permalink raw reply	[flat|nested] 21+ messages in thread
* [PATCHv11 0/5] New EH command timeout handler
@ 2013-11-11 12:44 Hannes Reinecke
  2013-11-11 12:44 ` [PATCH 2/5] scsi: improved eh " Hannes Reinecke
  0 siblings, 1 reply; 21+ messages in thread
From: Hannes Reinecke @ 2013-11-11 12:44 UTC (permalink / raw)
  To: James Bottomley
  Cc: linux-scsi, Christoph Hellwig, Ren Mingxin, Joern Engel,
	James Smart, 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

Changes to v5:
- Enable new eh timeout handler per default
- Update documentation

Changes to v6:
- Include changes from James Bottomley for erratic device
  offline patch
- Rearrange patches
- Update SCSI midlayer documentation

Changes to v7:
- Merge obsolete patch

Changes to v8:
- Include fixes from hch
- Include patch from Ren Mingxin to set eh_deadline to '0'

Changes to v9:
- Unlock accesses to eh_deadline

Changes to v10:
- Use private workqueue with WQ_MEM_RECLAIM set

Hannes Reinecke (3):
  scsi: improved eh timeout handler
  scsi: Unlock accesses to eh_deadline
  scsi: Update documentation

James Bottomley (1):
  scsi: Fix erratic device offline during EH

Ren Mingxin (1):
  scsi: Set the minimum valid value of 'eh_deadline' as 0

 Documentation/scsi/scsi_eh.txt          |  69 +++++-----
 Documentation/scsi/scsi_mid_low_api.txt |   9 +-
 drivers/scsi/hosts.c                    |  30 ++++-
 drivers/scsi/scsi.c                     |   9 +-
 drivers/scsi/scsi_error.c               | 229 ++++++++++++++++++++++++--------
 drivers/scsi/scsi_priv.h                |   2 +
 drivers/scsi/scsi_sysfs.c               |  36 +++--
 drivers/scsi/sd.c                       |  26 ++--
 include/scsi/scsi_cmnd.h                |   1 +
 include/scsi/scsi_driver.h              |   2 +-
 include/scsi/scsi_host.h                |  10 ++
 11 files changed, 299 insertions(+), 124 deletions(-)

-- 
1.7.12.4


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

end of thread, other threads:[~2014-02-12  7:49 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-05  7:05 [PATCHv10 0/5] New EH command timeout handler Hannes Reinecke
2013-11-05  7:05 ` [PATCH 1/5] scsi: Fix erratic device offline during EH Hannes Reinecke
2013-11-05  7:05 ` [PATCH 2/5] scsi: improved eh timeout handler Hannes Reinecke
2013-11-05 19:19   ` Mike Christie
2013-11-06  6:48     ` Hannes Reinecke
2013-11-06 17:23       ` Mike Christie
2013-11-07  6:45         ` Hannes Reinecke
2013-11-07 18:33           ` Douglas Gilbert
2013-11-08 15:54             ` Hannes Reinecke
2013-11-09  8:35           ` James Bottomley
2013-11-09 15:27             ` Hannes Reinecke
2013-11-06 14:47     ` Christoph Hellwig
2013-11-07  6:42       ` Hannes Reinecke
2013-11-05  7:05 ` [PATCH 3/5] scsi: Unlock accesses to eh_deadline Hannes Reinecke
2013-11-05  7:05 ` [PATCH 4/5] scsi: Set the minimum valid value of 'eh_deadline' as 0 Hannes Reinecke
2013-11-05  7:05 ` [PATCH 5/5] scsi: Update documentation Hannes Reinecke
  -- strict thread matches above, loose matches on Subject: below --
2013-11-11 12:44 [PATCHv11 0/5] New EH command timeout handler Hannes Reinecke
2013-11-11 12:44 ` [PATCH 2/5] scsi: improved eh " Hannes Reinecke
2014-02-11 14:01   ` Christoph Hellwig
2014-02-11 14:29     ` Hannes Reinecke
2014-02-12  7:45       ` Christoph Hellwig
2014-02-12  7:49         ` 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).