qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Stefan Hajnoczi <stefanha@redhat.com>, qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>, Ming Lei <ming.lei@canonical.com>,
	Fam Zheng <famz@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 7/9] virtio-blk: live migrate s->rq with multiqueue
Date: Sat, 21 May 2016 17:37:27 +0200	[thread overview]
Message-ID: <1055bf16-4a14-2a93-ff53-d3db7db0d547@redhat.com> (raw)
In-Reply-To: <1463787632-7241-8-git-send-email-stefanha@redhat.com>



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;

  reply	other threads:[~2016-05-21 15:37 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-20 23:40 [Qemu-devel] [PATCH 0/9] virtio-blk: multiqueue support Stefan Hajnoczi
2016-05-20 23:40 ` [Qemu-devel] [PATCH 1/9] virtio-blk: use batch notify in non-dataplane case Stefan Hajnoczi
2016-05-20 23:40 ` [Qemu-devel] [PATCH 2/9] virtio-blk: tell dataplane which vq to notify Stefan Hajnoczi
2016-05-20 23:40 ` [Qemu-devel] [PATCH 3/9] virtio-blk: associate request with a virtqueue Stefan Hajnoczi
2016-05-20 23:40 ` [Qemu-devel] [PATCH 4/9] virtio-blk: add VirtIOBlockConf->num_queues Stefan Hajnoczi
2016-05-20 23:40 ` [Qemu-devel] [PATCH 5/9] virtio-blk: multiqueue batch notify Stefan Hajnoczi
2016-05-21 16:02   ` Paolo Bonzini
2016-05-27 21:38     ` Stefan Hajnoczi
2016-05-23  2:43   ` Fam Zheng
2016-05-23  8:17     ` Paolo Bonzini
2016-05-23  8:56       ` Fam Zheng
2016-05-20 23:40 ` [Qemu-devel] [PATCH 6/9] vmstate: add VMSTATE_VARRAY_UINT32_ALLOC Stefan Hajnoczi
2016-05-20 23:40 ` [Qemu-devel] [PATCH 7/9] virtio-blk: live migrate s->rq with multiqueue Stefan Hajnoczi
2016-05-21 15:37   ` Paolo Bonzini [this message]
2016-05-27 21:42     ` Stefan Hajnoczi
2016-05-20 23:40 ` [Qemu-devel] [PATCH 8/9] virtio-blk: dataplane multiqueue support Stefan Hajnoczi
2016-05-20 23:40 ` [Qemu-devel] [PATCH 9/9] virtio-blk: add num-queues device property Stefan Hajnoczi
2016-05-24 12:51 ` [Qemu-devel] [PATCH 0/9] virtio-blk: multiqueue support Christian Borntraeger
2016-05-27 21:44   ` Stefan Hajnoczi
2016-05-31  0:44   ` Stefan Hajnoczi
2016-05-27 11:55 ` [Qemu-devel] [RFC] virtio-blk: simple multithreaded MQ implementation for bdrv_raw Roman Pen
2016-05-27 22:27   ` Stefan Hajnoczi
2016-05-30  6:40     ` Alexandre DERUMIER
2016-05-30 12:14       ` Roman Penyaev
2016-05-30 11:59     ` Roman Penyaev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1055bf16-4a14-2a93-ff53-d3db7db0d547@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=famz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=ming.lei@canonical.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).