All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Lieven <pl@kamp.de>
To: Stefan Hajnoczi <stefanha@gmail.com>,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>
Cc: Fam Zheng <famz@redhat.com>,
	wency@cn.fujitsu.com, qemu block <qemu-block@nongnu.org>,
	Juan Quintela <quintela@redhat.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	Stefan Hajnoczi <stefanha@redhat.com>
Subject: [Qemu-devel] block migration and dirty bitmap reset
Date: Wed, 7 Mar 2018 09:06:41 +0100	[thread overview]
Message-ID: <99df10d6-6514-56ee-16ce-8b7d1823cc08@kamp.de> (raw)
In-Reply-To: <231fe0ce-3df4-a175-2fba-403023cc65e1@kamp.de>

Hi,

while looking at the code I wonder if the blk_aio_preadv and the bdrv_reset_dirty_bitmap order must
be swapped in mig_save_device_bulk:

    qemu_mutex_lock_iothread();
    aio_context_acquire(blk_get_aio_context(bmds->blk));
    blk->aiocb = blk_aio_preadv(bb, cur_sector * BDRV_SECTOR_SIZE, &blk->qiov,
                                0, blk_mig_read_cb, blk);

    bdrv_reset_dirty_bitmap(bmds->dirty_bitmap, cur_sector * BDRV_SECTOR_SIZE,
                            nr_sectors * BDRV_SECTOR_SIZE);
    aio_context_release(blk_get_aio_context(bmds->blk));
    qemu_mutex_unlock_iothread();

In mig_save_device_dirty we first reset the dirty bitmap and read then which shoulds like
a better idea. Maybe it doesn't matter while we acquire the aioctx and the iothread lock...

Peter

  reply	other threads:[~2018-03-07  8:06 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-22 11:13 [Qemu-devel] block migration and MAX_IN_FLIGHT_IO Peter Lieven
2018-03-05 11:45 ` Stefan Hajnoczi
2018-03-05 14:37   ` Peter Lieven
2018-03-05 14:52     ` Dr. David Alan Gilbert
2018-03-06 16:07       ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2018-03-06 16:35         ` Peter Lieven
2018-03-07  7:55           ` Peter Lieven
2018-03-07  8:06             ` Peter Lieven [this message]
2018-03-08  1:28               ` [Qemu-devel] block migration and dirty bitmap reset Fam Zheng
2018-03-08  8:57                 ` Peter Lieven
2018-03-08  9:01                   ` Fam Zheng
2018-03-08 10:33                     ` Peter Lieven
2018-03-07  9:47             ` [Qemu-devel] [Qemu-block] block migration and MAX_IN_FLIGHT_IO Stefan Hajnoczi
2018-03-07 20:35               ` Peter Lieven
2018-03-06 16:14       ` [Qemu-devel] " Peter Lieven

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=99df10d6-6514-56ee-16ce-8b7d1823cc08@kamp.de \
    --to=pl@kamp.de \
    --cc=dgilbert@redhat.com \
    --cc=famz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=stefanha@gmail.com \
    --cc=stefanha@redhat.com \
    --cc=wency@cn.fujitsu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.