Skip to content

lpfc multiqueue performance fixes

Hannes Reinecke linux-scsi 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest14 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/14block: don't check request size in blk_cloned_rq_check_limits()block/blk-core.c+0 -50 replies
2/14lpfc: remove unused 'pring' argumentdrivers/scsi/lpfc/lpfc_sli.c+6 -110 replies
3/14lpfc: Add config option 'lpfc_enable_stats'drivers/scsi/lpfc/lpfc.h drivers/scsi/lpfc/lpfc_attr.c drivers/scsi/lpfc/lpfc_scsi.c+20 -120 replies
4/14scsi: add 'abort_completions' host template flagdrivers/scsi/scsi_error.c include/scsi/scsi_host.h+11 -20 replies
5/14lpfc: do not wait for completion when aborting commandsdrivers/scsi/lpfc/lpfc_scsi.c+47 -330 replies
6/14lpfc: display manual queue assignmentdrivers/scsi/lpfc/lpfc_attr.c+8 -20 replies
7/14scsi: modify can_queue after calling mq_allocate()drivers/scsi/scsi_lib.c+7 -10 replies
8/14blk-mq: add blk_mq_resize_tag_set()block/blk-mq.c include/linux/blk-mq.h+16 -01 reply
9/14scsi: Implement scsi_mq_resize_tags()drivers/scsi/scsi_lib.c include/scsi/scsi_host.h+7 -01 reply
10/14lpfc: use bitflag for exch_busydrivers/scsi/lpfc/lpfc_scsi.c drivers/scsi/lpfc/lpfc_scsi.h drivers/scsi/lpfc/lpfc_sli.c+18 -100 replies
11/14lpfc: set LPFC_CMD_ABORTED when a command is put on the aborted listdrivers/scsi/lpfc/lpfc_init.c drivers/scsi/lpfc/lpfc_scsi.c drivers/scsi/lpfc/lpfc_scsi.h+5 -00 replies
12/14lpfc: move to array based command allocation for SLI-4drivers/scsi/lpfc/lpfc.h drivers/scsi/lpfc/lpfc_init.c drivers/scsi/lpfc/lpfc_scsi.c +1 more+128 -170 replies
13/14lpfc: LPFC_CMD_RRQ_ACTIVE flag to mark commandsdrivers/scsi/lpfc/lpfc_scsi.c drivers/scsi/lpfc/lpfc_scsi.h drivers/scsi/lpfc/lpfc_sli.c+50 -10 replies
14/14lpfc: Complete scsi commands after RRQ has completeddrivers/scsi/lpfc/lpfc_scsi.c drivers/scsi/lpfc/lpfc_sli.c+19 -50 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 00/14] lpfc multiqueue performance fixes

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(-)
Signature · 1 line
1.8.5.6