From: Ming Lei <ming.lei@redhat.com>
To: Christoph Hellwig <hch@lst.de>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>,
Jens Axboe <axboe@fb.com>,
"Martin K . Petersen" <martin.petersen@oracle.com>,
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>, Omar Sandoval <osandov@fb.com>,
Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH V4 4/4] scsi: virtio_scsi: fix IO hang caused by irq vector automatic affinity
Date: Mon, 12 Mar 2018 17:00:58 +0800 [thread overview]
Message-ID: <20180312090052.GA23903@ming.t460p> (raw)
In-Reply-To: <20180310101520.GC32022@lst.de>
On Sat, Mar 10, 2018 at 11:15:20AM +0100, Christoph Hellwig wrote:
> This looks generally fine to me:
>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
>
> As a follow on we should probably kill virtscsi_queuecommand_single and
> thus virtscsi_host_template_single as well.
> > Given storage IO is always C/S model, there isn't such issue with SCSI_MQ(blk-mq),
>
> What does C/S mean here?
Client–Server.
>
> > @@ -580,10 +573,7 @@ static int virtscsi_queuecommand_single(struct Scsi_Host *sh,
> > struct scsi_cmnd *sc)
> > {
> > struct virtio_scsi *vscsi = shost_priv(sh);
> > - struct virtio_scsi_target_state *tgt =
> > - scsi_target(sc->device)->hostdata;
> >
> > - atomic_inc(&tgt->reqs);
> > return virtscsi_queuecommand(vscsi, &vscsi->req_vqs[0], sc);
> > }
>
> > static int virtscsi_queuecommand_multi(struct Scsi_Host *sh,
> > struct scsi_cmnd *sc)
> > {
> > struct virtio_scsi *vscsi = shost_priv(sh);
> > - struct virtio_scsi_target_state *tgt =
> > - scsi_target(sc->device)->hostdata;
> > - struct virtio_scsi_vq *req_vq;
> > -
> > - if (shost_use_blk_mq(sh))
> > - req_vq = virtscsi_pick_vq_mq(vscsi, sc);
> > - else
> > - req_vq = virtscsi_pick_vq(vscsi, tgt);
> > + struct virtio_scsi_vq *req_vq = virtscsi_pick_vq_mq(vscsi, sc);
> >
> > return virtscsi_queuecommand(vscsi, req_vq, sc);
>
> Given how virtscsi_pick_vq_mq works virtscsi_queuecommand_single and
> virtscsi_queuecommand_multi now have identical behavior. That means
> virtscsi_queuecommand_single should be removed, and
> virtscsi_queuecommand_multi should be merged into virtscsi_queuecommand,
OK.
>
> > @@ -823,6 +768,7 @@ static struct scsi_host_template virtscsi_host_template_single = {
> > .target_alloc = virtscsi_target_alloc,
> > .target_destroy = virtscsi_target_destroy,
> > .track_queue_depth = 1,
> > + .force_blk_mq = 1,
>
> This probably isn't strictly needed. That being said with your
> change we could probably just drop virtscsi_host_template_single entirely.
>
OK.
Thanks,
Ming
next prev parent reply other threads:[~2018-03-12 9:00 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-09 3:32 [PATCH V4 0/4] SCSI: fix selection of reply(hw) queue Ming Lei
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 [this message]
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=20180312090052.GA23903@ming.t460p \
--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=osandov@fb.com \
--cc=pbonzini@redhat.com \
--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.