Re: [PATCH v2 5/5] virtio-scsi: introduce multiqueue support

2012-12-25 Thread Wanlong Gao
On 12/19/2012 12:02 AM, Michael S. Tsirkin wrote: > On Tue, Dec 18, 2012 at 04:51:28PM +0100, Paolo Bonzini wrote: >> Il 18/12/2012 16:03, Michael S. Tsirkin ha scritto: >>> On Tue, Dec 18, 2012 at 03:08:08PM +0100, Paolo Bonzini wrote: Il 18/12/2012 14:57, Michael S. Tsirkin ha scritto:

Re: [PATCH v2 5/5] virtio-scsi: introduce multiqueue support

2012-12-25 Thread Wanlong Gao
On 12/19/2012 12:02 AM, Michael S. Tsirkin wrote: On Tue, Dec 18, 2012 at 04:51:28PM +0100, Paolo Bonzini wrote: Il 18/12/2012 16:03, Michael S. Tsirkin ha scritto: On Tue, Dec 18, 2012 at 03:08:08PM +0100, Paolo Bonzini wrote: Il 18/12/2012 14:57, Michael S. Tsirkin ha scritto: -static int

Re: [PATCH v2 5/5] virtio-scsi: introduce multiqueue support

2012-12-19 Thread Stefan Hajnoczi
On Tue, Dec 18, 2012 at 01:32:52PM +0100, Paolo Bonzini wrote: > struct virtio_scsi_target_state { > - /* Never held at the same time as vq_lock. */ > + /* This spinlock ever held at the same time as vq_lock. */ s/ever/is never/ -- To unsubscribe from this list: send the line

Re: [PATCH v2 5/5] virtio-scsi: introduce multiqueue support

2012-12-19 Thread Stefan Hajnoczi
On Tue, Dec 18, 2012 at 01:32:52PM +0100, Paolo Bonzini wrote: struct virtio_scsi_target_state { - /* Never held at the same time as vq_lock. */ + /* This spinlock ever held at the same time as vq_lock. */ s/ever/is never/ -- To unsubscribe from this list: send the line unsubscribe

Re: [PATCH v2 5/5] virtio-scsi: introduce multiqueue support

2012-12-18 Thread Michael S. Tsirkin
On Tue, Dec 18, 2012 at 04:51:28PM +0100, Paolo Bonzini wrote: > Il 18/12/2012 16:03, Michael S. Tsirkin ha scritto: > > On Tue, Dec 18, 2012 at 03:08:08PM +0100, Paolo Bonzini wrote: > >> Il 18/12/2012 14:57, Michael S. Tsirkin ha scritto: > -static int virtscsi_queuecommand(struct Scsi_Host

Re: [PATCH v2 5/5] virtio-scsi: introduce multiqueue support

2012-12-18 Thread Paolo Bonzini
Il 18/12/2012 16:03, Michael S. Tsirkin ha scritto: > On Tue, Dec 18, 2012 at 03:08:08PM +0100, Paolo Bonzini wrote: >> Il 18/12/2012 14:57, Michael S. Tsirkin ha scritto: -static int virtscsi_queuecommand(struct Scsi_Host *sh, struct scsi_cmnd *sc) +static int

Re: [PATCH v2 5/5] virtio-scsi: introduce multiqueue support

2012-12-18 Thread Michael S. Tsirkin
On Tue, Dec 18, 2012 at 03:08:08PM +0100, Paolo Bonzini wrote: > Il 18/12/2012 14:57, Michael S. Tsirkin ha scritto: > >> -static int virtscsi_queuecommand(struct Scsi_Host *sh, struct scsi_cmnd > >> *sc) > >> +static int virtscsi_queuecommand(struct virtio_scsi *vscsi, > >> +

Re: [PATCH v2 5/5] virtio-scsi: introduce multiqueue support

2012-12-18 Thread Paolo Bonzini
Il 18/12/2012 14:57, Michael S. Tsirkin ha scritto: >> -static int virtscsi_queuecommand(struct Scsi_Host *sh, struct scsi_cmnd *sc) >> +static int virtscsi_queuecommand(struct virtio_scsi *vscsi, >> + struct virtio_scsi_target_state *tgt, >> +

Re: [PATCH v2 5/5] virtio-scsi: introduce multiqueue support

2012-12-18 Thread Michael S. Tsirkin
On Tue, Dec 18, 2012 at 01:32:52PM +0100, Paolo Bonzini wrote: > This patch adds queue steering to virtio-scsi. When a target is sent > multiple requests, we always drive them to the same queue so that FIFO > processing order is kept. However, if a target was idle, we can choose > a queue

[PATCH v2 5/5] virtio-scsi: introduce multiqueue support

2012-12-18 Thread Paolo Bonzini
This patch adds queue steering to virtio-scsi. When a target is sent multiple requests, we always drive them to the same queue so that FIFO processing order is kept. However, if a target was idle, we can choose a queue arbitrarily. In this case the queue is chosen according to the current VCPU,

[PATCH v2 5/5] virtio-scsi: introduce multiqueue support

2012-12-18 Thread Paolo Bonzini
This patch adds queue steering to virtio-scsi. When a target is sent multiple requests, we always drive them to the same queue so that FIFO processing order is kept. However, if a target was idle, we can choose a queue arbitrarily. In this case the queue is chosen according to the current VCPU,

Re: [PATCH v2 5/5] virtio-scsi: introduce multiqueue support

2012-12-18 Thread Michael S. Tsirkin
On Tue, Dec 18, 2012 at 01:32:52PM +0100, Paolo Bonzini wrote: This patch adds queue steering to virtio-scsi. When a target is sent multiple requests, we always drive them to the same queue so that FIFO processing order is kept. However, if a target was idle, we can choose a queue

Re: [PATCH v2 5/5] virtio-scsi: introduce multiqueue support

2012-12-18 Thread Paolo Bonzini
Il 18/12/2012 14:57, Michael S. Tsirkin ha scritto: -static int virtscsi_queuecommand(struct Scsi_Host *sh, struct scsi_cmnd *sc) +static int virtscsi_queuecommand(struct virtio_scsi *vscsi, + struct virtio_scsi_target_state *tgt, +

Re: [PATCH v2 5/5] virtio-scsi: introduce multiqueue support

2012-12-18 Thread Michael S. Tsirkin
On Tue, Dec 18, 2012 at 03:08:08PM +0100, Paolo Bonzini wrote: Il 18/12/2012 14:57, Michael S. Tsirkin ha scritto: -static int virtscsi_queuecommand(struct Scsi_Host *sh, struct scsi_cmnd *sc) +static int virtscsi_queuecommand(struct virtio_scsi *vscsi, + struct

Re: [PATCH v2 5/5] virtio-scsi: introduce multiqueue support

2012-12-18 Thread Paolo Bonzini
Il 18/12/2012 16:03, Michael S. Tsirkin ha scritto: On Tue, Dec 18, 2012 at 03:08:08PM +0100, Paolo Bonzini wrote: Il 18/12/2012 14:57, Michael S. Tsirkin ha scritto: -static int virtscsi_queuecommand(struct Scsi_Host *sh, struct scsi_cmnd *sc) +static int virtscsi_queuecommand(struct

Re: [PATCH v2 5/5] virtio-scsi: introduce multiqueue support

2012-12-18 Thread Michael S. Tsirkin
On Tue, Dec 18, 2012 at 04:51:28PM +0100, Paolo Bonzini wrote: Il 18/12/2012 16:03, Michael S. Tsirkin ha scritto: On Tue, Dec 18, 2012 at 03:08:08PM +0100, Paolo Bonzini wrote: Il 18/12/2012 14:57, Michael S. Tsirkin ha scritto: -static int virtscsi_queuecommand(struct Scsi_Host *sh,