All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ming Lei <ming.lei@redhat.com>
To: James Bottomley <James.Bottomley@HansenPartnership.com>,
	Jens Axboe <axboe@fb.com>,
	"Martin K . Petersen" <martin.petersen@oracle.com>
Cc: Christoph Hellwig <hch@lst.de>,
	linux-scsi@vger.kernel.org, linux-block@vger.kernel.org,
	Meelis Roos <mroos@linux.ee>, Don Brace <don.brace@microsemi.com>,
	Kashyap Desai <kashyap.desai@broadcom.com>,
	Laurence Oberman <loberman@redhat.com>,
	Mike Snitzer <snitzer@redhat.com>, Ming Lei <ming.lei@redhat.com>
Subject: [PATCH V4 0/4] SCSI: fix selection of reply(hw) queue
Date: Fri,  9 Mar 2018 11:32:14 +0800	[thread overview]
Message-ID: <20180309033218.23042-1-ming.lei@redhat.com> (raw)

Hi All,

The patches fixes reply queue(virt-queue on virtio-scsi) selection on hpsa,
megaraid_sa and virtio-scsi, and IO hang can be caused easily by this issue.

This issue is triggered by 84676c1f21e8 ("genirq/affinity: assign vectors
to all possible CPUs"). After 84676c1f21e8, it is easy to see one msix
vector mapped to all offline CPUs. If the reply queue is seleteced from
all allocated msix vectors(reply queues) in round-roin way, the selected
replay queue may not have any online CPU mapped, IO hang is caused.

Both hpsa and megaraid_sas uses host-wide tagset, we can't convert the
reply queue to blk_mq hw queue directly, otherwise IO performance is degraded
much, according to Kashyap's test, so this patchset sets up one mapping talbe
for selecting reply queue, and this approach has been used by mpt3sas already.

For virtio-scsi, the virt-queue is really hw queue wrt. blk-mq view, so
we introduce 'force_blk_mq' for fix this issue because: 1) virtio-blk
has been used for years in blk-mq mode; 2) we have discussed recently
that scsi_mq will be enabled at default soon. 

gitweb:
	https://github.com/ming1/linux/tree/v4.16-rc-select-reply-queue-fix-V4

V4:
	- splitted from previous patchset
	- handle virtio-scsi by force_blk_mq

Ming Lei (4):
  scsi: hpsa: fix selection of reply queue
  scsi: megaraid_sas: fix selection of reply queue
  scsi: introduce force_blk_mq
  scsi: virtio_scsi: fix IO hang caused by irq vector automatic affinity

 drivers/scsi/hosts.c                        |  1 +
 drivers/scsi/hpsa.c                         | 73 +++++++++++++++++++++--------
 drivers/scsi/hpsa.h                         |  1 +
 drivers/scsi/megaraid/megaraid_sas.h        |  2 +-
 drivers/scsi/megaraid/megaraid_sas_base.c   | 34 +++++++++++++-
 drivers/scsi/megaraid/megaraid_sas_fusion.c | 12 ++---
 drivers/scsi/virtio_scsi.c                  | 59 ++---------------------
 include/scsi/scsi_host.h                    |  3 ++
 8 files changed, 100 insertions(+), 85 deletions(-)

-- 
2.9.5

             reply	other threads:[~2018-03-09  3:32 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-09  3:32 Ming Lei [this message]
2018-03-09  3:32 ` [PATCH V4 1/4] scsi: hpsa: fix selection of reply queue Ming Lei
2018-03-09 22:14   ` Don Brace
2018-03-10 10:09   ` Christoph Hellwig
2018-03-10 15:01     ` Ming Lei
2018-03-12  7:52       ` Christoph Hellwig
2018-03-12  9:19         ` Ming Lei
2018-03-12  7:37   ` Bityutskiy, Artem
2018-03-12 15:39   ` Don Brace
2018-03-09  3:32 ` [PATCH V4 2/4] scsi: megaraid_sas: " Ming Lei
2018-03-09 11:07   ` Kashyap Desai
2018-03-09 12:03     ` Ming Lei
2018-03-09 14:03       ` Kashyap Desai
2018-03-09  3:32 ` [PATCH V4 3/4] scsi: introduce force_blk_mq Ming Lei
2018-03-10 10:10   ` Christoph Hellwig
2018-03-09  3:32 ` [PATCH V4 4/4] scsi: virtio_scsi: fix IO hang caused by irq vector automatic affinity Ming Lei
2018-03-10 10:15   ` Christoph Hellwig
2018-03-12  9:00     ` Ming Lei
2018-03-09  7:00 ` [PATCH V4 0/4] SCSI: fix selection of reply(hw) queue Hannes Reinecke
2018-03-09  7:39   ` Ming Lei
2018-03-09 14:01 ` Meelis Roos

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=20180309033218.23042-1-ming.lei@redhat.com \
    --to=ming.lei@redhat.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=axboe@fb.com \
    --cc=don.brace@microsemi.com \
    --cc=hch@lst.de \
    --cc=kashyap.desai@broadcom.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=loberman@redhat.com \
    --cc=martin.petersen@oracle.com \
    --cc=mroos@linux.ee \
    --cc=snitzer@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.