From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: lizhijian@cn.fujitsu.com, den@openvz.org, quintela@redhat.com
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] safety of migration_bitmap_extend
Date: Tue, 3 Nov 2015 12:23:53 +0000 [thread overview]
Message-ID: <20151103122353.GB17670@work-vm> (raw)
Hi,
I'm trying to understand why migration_bitmap_extend is correct/safe;
If I understand correctly, you're arguing that:
1) the migration_bitmap_mutex around the extend, stops any sync's happening
and so no new bits will be set during the extend.
2) If migration sends a page and clears a bitmap entry, it doesn't
matter if we lose the 'clear' because we're copying it as
we extend it, because losing the clear just means the page
gets resent, and so the data is OK.
However, doesn't (2) mean that migration_dirty_pages might be wrong?
If a page was sent, the bit cleared, and migration_dirty_pages decremented,
then if we copy over that bitmap and 'set' that bit again then migration_dirty_pages
is too small; that means that either migration would finish too early,
or more likely, migration_dirty_pages would wrap-around -ve and
never finish.
Is there a reason it's really safe?
Dave
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
next reply other threads:[~2015-11-03 12:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-03 12:23 Dr. David Alan Gilbert [this message]
2015-11-03 12:55 ` [Qemu-devel] safety of migration_bitmap_extend Juan Quintela
2015-11-03 13:47 ` Dr. David Alan Gilbert
2015-11-04 3:10 ` Wen Congyang
2015-11-04 9:05 ` Dr. David Alan Gilbert
2015-11-04 9:13 ` Wen Congyang
2015-11-04 9:19 ` Dr. David Alan Gilbert
2015-11-12 8:33 ` Wen Congyang
2015-11-13 8:55 ` Li Zhijian
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=20151103122353.GB17670@work-vm \
--to=dgilbert@redhat.com \
--cc=den@openvz.org \
--cc=lizhijian@cn.fujitsu.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@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).