Re: [PATCH 2/2] virtio_scsi: implement request batching

2019-07-08 Thread Ming Lei
On Thu, May 30, 2019 at 7:28 PM Paolo Bonzini wrote: > > Adding the command and kicking the virtqueue so far was done one after > another. Make the kick optional, so that we can take into account SCMD_LAST. > We also need a commit_rqs callback to kick the device if blk-mq aborts > the submission

Re: [PATCH 2/2] virtio_scsi: implement request batching

2019-07-05 Thread Hannes Reinecke
On 5/30/19 1:28 PM, Paolo Bonzini wrote: > Adding the command and kicking the virtqueue so far was done one after > another. Make the kick optional, so that we can take into account SCMD_LAST. > We also need a commit_rqs callback to kick the device if blk-mq aborts > the submission before the last

Re: [PATCH 2/2] virtio_scsi: implement request batching

2019-05-31 Thread Paolo Bonzini
On 30/05/19 19:28, Bart Van Assche wrote: > On 5/30/19 4:28 AM, Paolo Bonzini wrote: >> @@ -531,7 +547,8 @@ static int virtscsi_queuecommand(struct Scsi_Host >> *shost, >>   req_size = sizeof(cmd->req.cmd); >>   } >>   -    ret = virtscsi_kick_cmd(req_vq, cmd, req_size, >> sizeof(cmd->r

Re: [PATCH 2/2] virtio_scsi: implement request batching

2019-05-30 Thread Bart Van Assche
On 5/30/19 4:28 AM, Paolo Bonzini wrote: @@ -531,7 +547,8 @@ static int virtscsi_queuecommand(struct Scsi_Host *shost, req_size = sizeof(cmd->req.cmd); } - ret = virtscsi_kick_cmd(req_vq, cmd, req_size, sizeof(cmd->resp.cmd)); + kick = (sc->flags & SCMD_LAST) !=

[PATCH 2/2] virtio_scsi: implement request batching

2019-05-30 Thread Paolo Bonzini
Adding the command and kicking the virtqueue so far was done one after another. Make the kick optional, so that we can take into account SCMD_LAST. We also need a commit_rqs callback to kick the device if blk-mq aborts the submission before the last request is reached. Suggested-by: Stefan Hajnoc