On 02/03/2018 05:21 AM, Ming Lei wrote: > Now 84676c1f21e8ff5(genirq/affinity: assign vectors to all possible CPUs) > has been merged to V4.16-rc, and it is easy to allocate all offline CPUs > for some irq vectors, this can't be avoided even though the allocation > is improved. > > For example, on a 8cores VM, 4~7 are not-present/offline, 4 queues of > virtio-scsi, the irq affinity assigned can become the following shape: > > irq 36, cpu list 0-7 > irq 37, cpu list 0-7 > irq 38, cpu list 0-7 > irq 39, cpu list 0-1 > irq 40, cpu list 4,6 > irq 41, cpu list 2-3 > irq 42, cpu list 5,7 > > Then IO hang is triggered in case of non-SCSI_MQ. > > Given storage IO is always C/S model, there isn't such issue with > SCSI_MQ(blk-mq), > because no IO can be submitted to one hw queue if the hw queue hasn't online > CPUs. > > Fix this issue by forcing to use blk_mq. > > BTW, I have been used virtio-scsi(scsi_mq) for several years, and it has > been quite stable, so it shouldn't cause extra risk. > > Cc: Hannes Reinecke <h...@suse.de> > Cc: Arun Easi <arun.e...@cavium.com> > Cc: Omar Sandoval <osan...@fb.com>, > Cc: "Martin K. Petersen" <martin.peter...@oracle.com>, > Cc: James Bottomley <james.bottom...@hansenpartnership.com>, > Cc: Christoph Hellwig <h...@lst.de>, > Cc: Don Brace <don.br...@microsemi.com> > Cc: Kashyap Desai <kashyap.de...@broadcom.com> > Cc: Peter Rivera <peter.riv...@broadcom.com> > Cc: Paolo Bonzini <pbonz...@redhat.com> > Cc: Laurence Oberman <lober...@redhat.com> > Cc: Mike Snitzer <snit...@redhat.com> > Signed-off-by: Ming Lei <ming....@redhat.com> > --- > drivers/scsi/virtio_scsi.c | 59 > +++------------------------------------------- > 1 file changed, 3 insertions(+), 56 deletions(-) > Reviewed-by: Hannes Reinecke <h...@suse.com>
Cheers, Hannes -- Dr. Hannes Reinecke Teamlead Storage & Networking h...@suse.de +49 911 74053 688 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton HRB 21284 (AG Nürnberg)