From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
To: Fam Zheng <famz@redhat.com>, John Snow <jsnow@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
pbonzini@redhat.com, Stefan Hajnoczi <stefanha@redhat.com>,
qemu-devel@nongnu.org, qemu-block@nongnu.org
Subject: Re: [Qemu-devel] [PATCH RFC for-2.6 0/3] block: Add meta dirty bitmap for migration/persistence
Date: Wed, 9 Dec 2015 14:57:18 +0300 [thread overview]
Message-ID: <5668171E.4000709@virtuozzo.com> (raw)
In-Reply-To: <20151208013628.GC7567@ad.usersys.redhat.com>
On 08.12.2015 04:36, Fam Zheng wrote:
> On Mon, 12/07 18:47, John Snow wrote:
>>
>> On 12/07/2015 12:59 AM, Fam Zheng wrote:
>>> Vladimir,
>>>
>>> This is what I propose to implement meta bitmap. It's implemented in the
>>> HBitmap level to be more efficient, and the interface slightly varies too.
>>>
>> I missed it: What was wrong with Vladimir's approach / what are the
>> benefits of this approach?
> The only real difference with this series is, only actual bit toggling will
> mark meta dirty. Vladimir's approach was in BdrvDirtyBitmap level which can't
> tell bit toggling from repetitive bit set/unset. This is from his patch:
Ok, you are right. It's truth.
>
> @@ -3390,6 +3428,9 @@ void bdrv_set_dirty_bitmap(BdrvDirtyBitmap *bitmap,
> {
> assert(bdrv_dirty_bitmap_enabled(bitmap));
> hbitmap_set(bitmap->bitmap, cur_sector, nr_sectors);
> + if (bitmap->meta_bitmap) {
> + hbitmap_set(bitmap->meta_bitmap, cur_sector, nr_sectors);
> + }
> }
>
> void bdrv_reset_dirty_bitmap(BdrvDirtyBitmap *bitmap,
> @@ -3397,6 +3438,9 @@ void bdrv_reset_dirty_bitmap(BdrvDirtyBitmap *bitmap,
> {
> assert(bdrv_dirty_bitmap_enabled(bitmap));
> hbitmap_reset(bitmap->bitmap, cur_sector, nr_sectors);
> + if (bitmap->meta_bitmap) {
> + hbitmap_set(bitmap->meta_bitmap, cur_sector, nr_sectors);
> + }
> }
>
> void bdrv_clear_dirty_bitmap(BdrvDirtyBitmap *bitmap)
>
>>> I'd like to use these operations to make dirty bitmap persistence more
>>> efficient too: unchanged dirty bits don't need to be flushed to disk. So I'm
>>> posting this as a separate series for a common base for both sides.
>>>
>> This is a reasonable use of the meta-bitmap strategy in general.
>>
>> Keep in mind Vladimir's approach to Meta bitmaps used a different
>> granularity such that 1 physical bit implied 1 sector needed to be
>> re-transmitted.
> Yes, I can fix the meta bitmap granularity.
>
>> A meta-bitmap that keeps track of disk flushes may require a different
>> granularity than one used for migration.
>>
>>> Posting as RFC as 2.6 dev phase is just starting, we can still tweak the
>>> interface and/or implementation to fit the need.
>>>
>>> Fam Zheng (3):
>>> HBitmap: Introduce "meta" bitmap to track bit changes
>>> tests: Add test code for meta bitmap
>>> block: Support meta dirty bitmap
>>>
>>> block.c | 46 ++++++++++++++++++++++++++++++-
>>> block/mirror.c | 3 +-
>>> blockdev.c | 3 +-
>>> include/block/block.h | 11 ++++++++
>>> include/qemu/hbitmap.h | 7 +++++
>>> migration/block.c | 2 +-
>>> tests/test-hbitmap.c | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++
>>> util/hbitmap.c | 22 +++++++++++++++
>>> 8 files changed, 164 insertions(+), 4 deletions(-)
>>>
--
Best regards,
Vladimir
* now, @virtuozzo.com instead of @parallels.com. Sorry for this inconvenience.
prev parent reply other threads:[~2015-12-09 11:57 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-07 5:59 [Qemu-devel] [PATCH RFC for-2.6 0/3] block: Add meta dirty bitmap for migration/persistence Fam Zheng
2015-12-07 5:59 ` [Qemu-devel] [PATCH RFC for-2.6 1/3] HBitmap: Introduce "meta" bitmap to track bit changes Fam Zheng
2015-12-07 13:32 ` Vladimir Sementsov-Ogievskiy
2015-12-08 1:31 ` Fam Zheng
2015-12-09 11:51 ` Vladimir Sementsov-Ogievskiy
2015-12-30 10:53 ` Vladimir Sementsov-Ogievskiy
2015-12-30 11:07 ` Fam Zheng
2015-12-30 11:26 ` Vladimir Sementsov-Ogievskiy
2016-01-21 10:58 ` Vladimir Sementsov-Ogievskiy
2016-01-22 3:10 ` Fam Zheng
2015-12-07 5:59 ` [Qemu-devel] [PATCH RFC for-2.6 2/3] tests: Add test code for meta bitmap Fam Zheng
2015-12-07 5:59 ` [Qemu-devel] [PATCH RFC for-2.6 3/3] block: Support meta dirty bitmap Fam Zheng
2015-12-07 14:19 ` [Qemu-devel] [PATCH RFC for-2.6 0/3] block: Add meta dirty bitmap for migration/persistence Vladimir Sementsov-Ogievskiy
2015-12-08 1:42 ` Fam Zheng
2015-12-09 11:46 ` Vladimir Sementsov-Ogievskiy
2015-12-07 23:47 ` John Snow
2015-12-08 1:36 ` Fam Zheng
2015-12-09 11:57 ` Vladimir Sementsov-Ogievskiy [this message]
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=5668171E.4000709@virtuozzo.com \
--to=vsementsov@virtuozzo.com \
--cc=famz@redhat.com \
--cc=jsnow@redhat.com \
--cc=kwolf@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-block@nongnu.org \
--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).