linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: James Bottomley <jbottomley@parallels.com>
Cc: linux-scsi@vger.kernel.org, Joern Engel <joern@logfs.org>,
	Ewan Milne <emilne@redhat.com>,
	James Smart <james.smart@emulex.com>,
	Ren Mingxin <renmx@cn.fujitsu.com>,
	Roland Dreier <roland@purestorage.com>,
	Bryn Reeves <bmr@redhat.com>,
	Christoph Hellwig <hch@infradead.org>,
	Hannes Reinecke <hare@suse.de>
Subject: [PATCHv2 0/9] New SCSI command timeout handler
Date: Mon, 10 Jun 2013 09:40:49 +0200	[thread overview]
Message-ID: <1370850058-27613-1-git-send-email-hare@suse.de> (raw)

this is the first step towards a new non-blocking
error handler. This patch implements a new command
timeout handler which will be sending command aborts
inline without engaging SCSI EH.

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

With the original scsi error recovery I got:
# time dd if=/dev/zero of=/mnt/test.blk bs=512 count=2048 oflag=sync
2048+0 records in
2048+0 records out
1048576 bytes (1.0 MB) copied, 3.72732 s, 281 kB/s

real	2m14.475s
user	0m0.000s
sys	0m0.104s

with this patchset I got:
# time dd if=/dev/zero of=/mnt/test.blk bs=512 count=2048 oflag=sync
2048+0 records in
2048+0 records out
1048576 bytes (1.0 MB) copied, 31.5151 s, 33.3 kB/s

real	0m31.519s
user	0m0.000s
sys	0m0.088s

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.

Comments etc are welcome.

Hannes Reinecke (9):
  scsi: move initialization of scmd->eh_entry
  blk-timeout: add BLK_EH_SCHEDULED return code
  scsi: improved eh timeout handler
  virtio_scsi: Enable new EH timeout handler
  virtio-scsi: Implement TMF timeout
  libsas: Enable new EH timeout handler
  mptsas: Enable new EH timeout handler
  mpt2sas: Enable new EH timeout handler
  mpt3sas: Enable new EH timeout handler

 drivers/message/fusion/mptsas.c      |   1 +
 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 |  11 +++
 drivers/scsi/mpt3sas/mpt3sas_scsih.c |  11 +++
 drivers/scsi/scsi_error.c            | 126 ++++++++++++++++++++++++++++++++++-
 drivers/scsi/scsi_lib.c              |   4 +-
 drivers/scsi/scsi_scan.c             |   3 +
 drivers/scsi/scsi_sysfs.c            |   5 ++
 drivers/scsi/scsi_transport_fc.c     |   2 +-
 drivers/scsi/virtio_scsi.c           |  14 +++-
 include/linux/blkdev.h               |   1 +
 include/scsi/scsi_cmnd.h             |   1 +
 include/scsi/scsi_device.h           |   2 +
 15 files changed, 184 insertions(+), 7 deletions(-)

-- 
1.7.12.4


             reply	other threads:[~2013-06-10  7:41 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-10  7:40 Hannes Reinecke [this message]
2013-06-10  7:40 ` [PATCH 1/9] scsi: move initialization of scmd->eh_entry Hannes Reinecke
2013-06-10  8:17   ` Christoph Hellwig
2013-06-10  7:40 ` [PATCH 2/9] blk-timeout: add BLK_EH_SCHEDULED return code Hannes Reinecke
2013-06-10  7:40 ` [PATCH 3/9] scsi: improved eh timeout handler Hannes Reinecke
2013-06-10  8:20   ` Christoph Hellwig
2013-06-10  9:00     ` Hannes Reinecke
2013-06-10 15:19       ` Jörn Engel
2013-06-10 23:24         ` Jörn Engel
2013-06-11  6:18           ` Hannes Reinecke
2013-06-11 16:35             ` Jörn Engel
2013-06-11 18:57     ` James Bottomley
2013-06-11 20:41       ` Ewan Milne
2013-06-11 20:54         ` James Bottomley
2013-06-12  5:54       ` Hannes Reinecke
2013-06-12  6:34       ` Bart Van Assche
2013-06-12  6:42         ` Hannes Reinecke
2013-06-10 15:47   ` Jörn Engel
2013-06-10  7:40 ` [PATCH 4/9] virtio_scsi: Enable new EH " Hannes Reinecke
2013-06-12 14:54   ` Paolo Bonzini
2013-06-13  1:58   ` Asias He
2013-06-10  7:40 ` [PATCH 5/9] virtio-scsi: Implement TMF timeout Hannes Reinecke
2013-06-12 14:54   ` Paolo Bonzini
2013-06-13  1:58   ` Asias He
2013-06-10  7:40 ` [PATCH 6/9] libsas: Enable new EH timeout handler Hannes Reinecke
2013-06-10  7:40 ` [PATCH 7/9] mptsas: " Hannes Reinecke
2013-06-10  7:40 ` [PATCH 8/9] mpt2sas: " Hannes Reinecke
2013-06-10 15:31   ` Jörn Engel
2013-06-11  5:41     ` Hannes Reinecke
2013-06-10  7:40 ` [PATCH 9/9] mpt3sas: " Hannes Reinecke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1370850058-27613-1-git-send-email-hare@suse.de \
    --to=hare@suse.de \
    --cc=bmr@redhat.com \
    --cc=emilne@redhat.com \
    --cc=hch@infradead.org \
    --cc=james.smart@emulex.com \
    --cc=jbottomley@parallels.com \
    --cc=joern@logfs.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=renmx@cn.fujitsu.com \
    --cc=roland@purestorage.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).