[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [Qemu-devel] [PATCH v2 3/6] block: Add VFIO based NVMe
From: |
Fam Zheng |
Subject: |
Re: [Qemu-block] [Qemu-devel] [PATCH v2 3/6] block: Add VFIO based NVMe driver |
Date: |
Thu, 23 Feb 2017 18:01:28 +0800 |
User-agent: |
Mutt/1.7.1 (2016-10-04) |
On Thu, 02/23 10:43, Paolo Bonzini wrote:
>
>
> On 23/02/2017 10:18, Fam Zheng wrote:
> > + for (i = 0; i < s->nr_queues; ++i) {
> > + s->queues[i]->free_req_queue_bh =
> > + aio_bh_new(new_context, nvme_free_req_queue_cb, s->queues[i]);
> > + }
>
> aio_bh_new has the issue that you can complete two requests in one
> nvme_process_completion call, but you would only invoke the bottom half
> once. Because this is a rare event, I think it's enough to use
> aio_bh_schedule_oneshot instead of aio_bh_new.
Yes, that should work.
>
> > +static coroutine_fn int nvme_cmd_unmap_qiov(BlockDriverState *bs,
> > + QEMUIOVector *qiov)
> > +{
> > + int r = 0;
> > + BDRVNVMeState *s = bs->opaque;
> > +
> > + if (!s->inflight && !qemu_co_queue_empty(&s->dma_flush_queue)) {
> > + r = nvme_vfio_dma_reset_temporary(s->vfio);
> > + qemu_co_queue_next(&s->dma_flush_queue);
> > + }
> > + return r;
> > +}
>
> Should this be qemu_co_queue_restart_all instead?
You are right, will fix!
Fam
- [Qemu-block] [PATCH v2 0/6] block: Add VFIO based driver for NVMe device, Fam Zheng, 2017/02/23
- [Qemu-block] [PATCH v2 2/6] stubs: Add stubs for ram block notifier API, Fam Zheng, 2017/02/23
- [Qemu-block] [PATCH v2 1/6] nvme: Move NVMe definitions to a separate header, Fam Zheng, 2017/02/23
- [Qemu-block] [PATCH v2 4/6] block: Introduce bdrv_dma_map and bdrv_dma_unmap, Fam Zheng, 2017/02/23
- [Qemu-block] [PATCH v2 5/6] block/nvme: Implement .bdrv_dma_map and .bdrv_dma_unmap, Fam Zheng, 2017/02/23
- [Qemu-block] [PATCH v2 3/6] block: Add VFIO based NVMe driver, Fam Zheng, 2017/02/23
- [Qemu-block] [PATCH v2 6/6] qemu-img: dma map buffers, Fam Zheng, 2017/02/23
- Re: [Qemu-block] [Qemu-devel] [PATCH v2 0/6] block: Add VFIO based driver for NVMe device, no-reply, 2017/02/23
- Re: [Qemu-block] [Qemu-devel] [PATCH v2 0/6] block: Add VFIO based driver for NVMe device, Fam Zheng, 2017/02/23