Hi Joseph, Thanks for looking at this so promptly. I have downloaded and tested your kernel. It appears to work well both with scsi mq enabled and disabled (over virtio-scsi). I also ran some basic io integrity tests and didn't spot any problems.
Before you commit this, may I propose a v2 of my own patch which is functionally identical but slightly more elegant? It does the atomic_inc() within virtscsi_pick_vq_mq(). That's probably preferable given the other uses of atomic_*() for non-mq are done within virtscsi_pick_vq(). Have a look: -------------8<------------- --- old/linux-4.4.0/drivers/scsi/virtio_scsi.c 2018-06-04 10:23:07.000000000 -0700 +++ new/linux-4.4.0/drivers/scsi/virtio_scsi.c 2018-06-07 06:20:58.596764040 -0700 @@ -588,11 +588,13 @@ } static struct virtio_scsi_vq *virtscsi_pick_vq_mq(struct virtio_scsi *vscsi, + struct virtio_scsi_target_state *tgt, struct scsi_cmnd *sc) { u32 tag = blk_mq_unique_tag(sc->request); u16 hwq = blk_mq_unique_tag_to_hwq(tag); + atomic_inc(&tgt->reqs); return &vscsi->req_vqs[hwq]; } @@ -642,7 +644,7 @@ struct virtio_scsi_vq *req_vq; if (shost_use_blk_mq(sh)) - req_vq = virtscsi_pick_vq_mq(vscsi, sc); + req_vq = virtscsi_pick_vq_mq(vscsi, tgt, sc); else req_vq = virtscsi_pick_vq(vscsi, tgt); Signed-off-by: Felipe Franciosi <fel...@nutanix.com> -------------8<------------- I'm happy to test it again if you'd like, but it should be functionally identical. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1775235 Title: Ubuntu 16.04 (4.4.0-127) hangs on boot with virtio-scsi MQ enabled To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1775235/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs