linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Christoph Hellwig <hch@lst.de>,
	James Bottomley <james.bottomley@hansenpartnership.com>,
	James Smart <james.smart@broadcom.com>,
	Dick Kennedy <dick.kennedy@broadcom.com>,
	linux-scsi@vger.kernel.org, Hannes Reinecke <hare@suse.de>
Subject: [PATCH 00/14] lpfc multiqueue performance fixes
Date: Thu,  2 Jun 2016 16:39:02 +0200	[thread overview]
Message-ID: <1464878356-42407-1-git-send-email-hare@suse.de> (raw)

Hi all,

here's a patchset to improve lpfc multiqueue performance.
They are a reworked version of those which I've used for
the performance tests I've presented at VAULT 2016.

The patches address two issues in the lpfc driver:
- Decouple abort I/O handling.
  Currently the lpfc driver has to synchronize I/O completions
  with pending aborts, which involves taking a spinlock during
  I/O completion. With this patchset aborts can run independent
  of the I/O completion, and the spinlock can be avoided.
- Array-based command allocation.
  The original driver was using a list-based command allocation,
  which required us to take a lock during command submission.
  This patchset implements an array-based command allocation where
  each element is addressed by the command tag. As the blocklayer
  ensures that we'll never see busy tags we can avoid the spinlock.

To decoupling aborts and I/O completion works as the firmware will
always send an I/O completion, even if the command has been aborted.
So we can as well keep the I/O running when an abort is active (ie
the block timeout function will return BLK_EH_RESET_TIMER), and
complete the command _after_ the aborts are finished. This way
we can ensure that no aborts will be running by the time the I/O
completion (ie ->scsi_done()) is called.
As there are potentially other drivers which could benefit from this
I've added a new SCSI host template flag 'abort_completions'.

The patchset is based on linux v4.7, and can be found at

http://git.kernel.org/hare/scsi-devel/h/lpfc.v3

As usual, comments and reviews are welcome.

Hannes Reinecke (14):
  block: don't check request size in blk_cloned_rq_check_limits()
  lpfc: remove unused 'pring' argument
  lpfc: Add config option 'lpfc_enable_stats'
  scsi: add 'abort_completions' host template flag
  lpfc: do not wait for completion when aborting commands
  lpfc: display manual queue assignment
  scsi: modify can_queue after calling mq_allocate()
  blk-mq: add blk_mq_resize_tag_set()
  scsi: Implement scsi_mq_resize_tags()
  lpfc: use bitflag for exch_busy
  lpfc: set LPFC_CMD_ABORTED when a command is put on the aborted list
  lpfc: move to array based command allocation for SLI-4
  lpfc: LPFC_CMD_RRQ_ACTIVE flag to mark commands
  lpfc: Complete scsi commands after RRQ has completed

 block/blk-core.c              |   5 -
 block/blk-mq.c                |  15 +++
 drivers/scsi/lpfc/lpfc.h      |   2 +
 drivers/scsi/lpfc/lpfc_attr.c |  20 +++-
 drivers/scsi/lpfc/lpfc_init.c |  54 +++++++++-
 drivers/scsi/lpfc/lpfc_scsi.c | 222 +++++++++++++++++++++++++++++-------------
 drivers/scsi/lpfc/lpfc_scsi.h |   7 +-
 drivers/scsi/lpfc/lpfc_sli.c  |  77 ++++++++++++---
 drivers/scsi/scsi_error.c     |   7 +-
 drivers/scsi/scsi_lib.c       |  14 ++-
 include/linux/blk-mq.h        |   1 +
 include/scsi/scsi_host.h      |   7 ++
 12 files changed, 337 insertions(+), 94 deletions(-)

-- 
1.8.5.6


             reply	other threads:[~2016-06-02 14:39 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-02 14:39 Hannes Reinecke [this message]
2016-06-02 14:39 ` [PATCH 01/14] block: don't check request size in blk_cloned_rq_check_limits() Hannes Reinecke
2016-06-02 14:39 ` [PATCH 02/14] lpfc: remove unused 'pring' argument Hannes Reinecke
2016-06-02 14:39 ` [PATCH 03/14] lpfc: Add config option 'lpfc_enable_stats' Hannes Reinecke
2016-06-02 14:39 ` [PATCH 04/14] scsi: add 'abort_completions' host template flag Hannes Reinecke
2016-06-02 14:39 ` [PATCH 05/14] lpfc: do not wait for completion when aborting commands Hannes Reinecke
2016-06-02 14:39 ` [PATCH 06/14] lpfc: display manual queue assignment Hannes Reinecke
2016-06-02 14:39 ` [PATCH 07/14] scsi: modify can_queue after calling mq_allocate() Hannes Reinecke
2016-06-02 14:39 ` [PATCH 08/14] blk-mq: add blk_mq_resize_tag_set() Hannes Reinecke
2016-06-02 15:55   ` Bart Van Assche
2016-06-02 14:39 ` [PATCH 09/14] scsi: Implement scsi_mq_resize_tags() Hannes Reinecke
2016-06-02 15:58   ` Bart Van Assche
2016-06-02 14:39 ` [PATCH 10/14] lpfc: use bitflag for exch_busy Hannes Reinecke
2016-06-02 14:39 ` [PATCH 11/14] lpfc: set LPFC_CMD_ABORTED when a command is put on the aborted list Hannes Reinecke
2016-06-02 14:39 ` [PATCH 12/14] lpfc: move to array based command allocation for SLI-4 Hannes Reinecke
2016-06-02 14:39 ` [PATCH 13/14] lpfc: LPFC_CMD_RRQ_ACTIVE flag to mark commands Hannes Reinecke
2016-06-02 14:39 ` [PATCH 14/14] lpfc: Complete scsi commands after RRQ has completed 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=1464878356-42407-1-git-send-email-hare@suse.de \
    --to=hare@suse.de \
    --cc=dick.kennedy@broadcom.com \
    --cc=hch@lst.de \
    --cc=james.bottomley@hansenpartnership.com \
    --cc=james.smart@broadcom.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.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).