[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 0/7] virtio-scsi: Asynchronous cancellation
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH v2 0/7] virtio-scsi: Asynchronous cancellation |
Date: |
Wed, 24 Sep 2014 13:10:08 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0 |
Il 24/09/2014 10:27, Fam Zheng ha scritto:
> v2: Address Paolo's comments:
> - Drop scsi_req_abort.
> - Split patch 1.
> - Use NotifierList.
> - Track the number of cancelled requests in virtio-scsi.
>
> This series changes VIRTIO_SCSI_T_TMF_ABORT_TASK and
> VIRTIO_SCSI_T_TMF_ABORT_TASK_SET emulation to asynchronous by making use of
> bdrv_aio_cancel_async.
>
> Before, when guest cancels a SCSI command, we use a nested poll loop to wait
> until the request is cancelled or completed before returning. This blocks the
> whole vm and makes the guest unresponsive if the backend block device takes
> time to complete it, possibly because of slow IO, throttling, network issue,
> etc..
>
> Now we return to the guest to allow vcpus to run before completing the TMF,
> and
> only after all the requests have been canceled, we notify the guest about the
> completing of the TMF command.
>
>
>
> Fam Zheng (7):
> scsi: Drop scsi_req_abort
> scsi-generic: Handle canceled request in scsi_command_complete
> scsi-bus: Unify request unref in scsi_req_cancel
> scsi: Drop SCSIReqOps.cancel_io
> scsi: Introduce scsi_req_canceled
> scsi: Introduce scsi_req_cancel_async
> virtio-scsi: Handle TMF request cancellation asynchronously
>
> hw/scsi/scsi-bus.c | 48 +++++++++++++++++++----------
> hw/scsi/scsi-disk.c | 59 ++++++++++-------------------------
> hw/scsi/scsi-generic.c | 37 ++++++----------------
> hw/scsi/spapr_vscsi.c | 11 +++++--
> hw/scsi/virtio-scsi.c | 84
> +++++++++++++++++++++++++++++++++++++++++++++-----
> include/hw/scsi/scsi.h | 5 ++-
> 6 files changed, 146 insertions(+), 98 deletions(-)
>
I didn't review 5-7 yet, and they are more complicated so I'll start by
applying the nice cleanup part (1-4).
Thanks!
Paolo
- [Qemu-devel] [PATCH v2 3/7] scsi-bus: Unify request unref in scsi_req_cancel, (continued)
- [Qemu-devel] [PATCH v2 3/7] scsi-bus: Unify request unref in scsi_req_cancel, Fam Zheng, 2014/09/24
- [Qemu-devel] [PATCH v2 4/7] scsi: Drop SCSIReqOps.cancel_io, Fam Zheng, 2014/09/24
- [Qemu-devel] [PATCH v2 5/7] scsi: Introduce scsi_req_canceled, Fam Zheng, 2014/09/24
- [Qemu-devel] [PATCH v2 6/7] scsi: Introduce scsi_req_cancel_async, Fam Zheng, 2014/09/24
- [Qemu-devel] [PATCH v2 7/7] virtio-scsi: Handle TMF request cancellation asynchronously, Fam Zheng, 2014/09/24
- Re: [Qemu-devel] [PATCH v2 0/7] virtio-scsi: Asynchronous cancellation,
Paolo Bonzini <=