[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 7/9] virtio-blk: live migrate s->rq with multiqu
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 7/9] virtio-blk: live migrate s->rq with multiqueue |
Date: |
Sat, 21 May 2016 17:37:27 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.0 |
On 21/05/2016 01:40, Stefan Hajnoczi wrote:
> while (req) {
> qemu_put_sbyte(f, 1);
Could you just put an extra 32-bit queue id here if num_queues > 1? A
guest with num_queues > 1 cannot be started on pre-2.7 QEMU, so you can
change the migration format (if virtio were using vmstate, it would be a
VMSTATE_UINT32_TEST).
Thanks,
Paolo
> qemu_put_virtqueue_element(f, &req->elem);
> req = req->next;
> + s->num_rq++;
> }
> qemu_put_sbyte(f, 0);
> +
> + /* In order to distinguish virtio-blk subsections from the generic virtio
> + * device subsections that follow we emit a terminating byte. Old
> versions
> + * of QEMU don't expect the terminating byte so, for compatibility, only
> + * write it when virtio-blk subsections are needed.
> + */
> + if (virtio_blk_mq_rq_indices_needed(s)) {
> + uint32_t i;
> +
> + s->mq_rq_indices = g_new(uint32_t, s->num_rq);
> + req = s->rq;
> + for (i = 0; i < s->num_rq; i++) {
> + s->mq_rq_indices[i] = virtio_get_queue_index(req->vq);
> + req = req->next;
> + }
> +
> + vmstate_save_state(f, &virtio_blk_vmstate, s, NULL);
> + qemu_put_ubyte(f, ~QEMU_VM_SUBSECTION);
> +
> + g_free(s->mq_rq_indices);
> + s->mq_rq_indices = NULL;
- [Qemu-devel] [PATCH 3/9] virtio-blk: associate request with a virtqueue, (continued)
- [Qemu-devel] [PATCH 4/9] virtio-blk: add VirtIOBlockConf->num_queues, Stefan Hajnoczi, 2016/05/20
- [Qemu-devel] [PATCH 6/9] vmstate: add VMSTATE_VARRAY_UINT32_ALLOC, Stefan Hajnoczi, 2016/05/20
- [Qemu-devel] [PATCH 7/9] virtio-blk: live migrate s->rq with multiqueue, Stefan Hajnoczi, 2016/05/20
- Re: [Qemu-devel] [PATCH 7/9] virtio-blk: live migrate s->rq with multiqueue,
Paolo Bonzini <=
- [Qemu-devel] [PATCH 9/9] virtio-blk: add num-queues device property, Stefan Hajnoczi, 2016/05/20
- [Qemu-devel] [PATCH 8/9] virtio-blk: dataplane multiqueue support, Stefan Hajnoczi, 2016/05/20
- Re: [Qemu-devel] [PATCH 0/9] virtio-blk: multiqueue support, Christian Borntraeger, 2016/05/24
- [Qemu-devel] [RFC] virtio-blk: simple multithreaded MQ implementation for bdrv_raw, Roman Pen, 2016/05/27