* [Qemu-devel] An issue in block-migration
@ 2013-10-03 4:23 Yaodong Yang
2013-10-10 8:46 ` Stefan Hajnoczi
0 siblings, 1 reply; 2+ messages in thread
From: Yaodong Yang @ 2013-10-03 4:23 UTC (permalink / raw)
To: qemu-discuss, qemu-devel; +Cc: Yaodong Yang
[-- Attachment #1: Type: text/plain, Size: 531 bytes --]
Hi all,
In block-migration.c file, line 435, if (bdrv_get_dirty(bmds->bs, sector)) {
It looks like this "if statement" is used to check whether a chunk is dirty or not. If it is dirty, system will migrate a whole chunk, 1MB data, to the destination. Otherwise, the cur_dirty will increase by 1MB/512B sectors.
However, in my understanding, this function, bdrv_get_dirty(bmds->bs, sector), only check this sector (512B) is dirty or not, rather than a whole chunk (1MB). Could someone tell me the reason?
Thanks!
Yaodong
[-- Attachment #2.1: Type: text/html, Size: 724 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] An issue in block-migration
2013-10-03 4:23 [Qemu-devel] An issue in block-migration Yaodong Yang
@ 2013-10-10 8:46 ` Stefan Hajnoczi
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Hajnoczi @ 2013-10-10 8:46 UTC (permalink / raw)
To: Yaodong Yang; +Cc: Paolo Bonzini, qemu-devel, qemu-discuss
On Thu, Oct 03, 2013 at 04:23:45AM +0000, Yaodong Yang wrote:
> In block-migration.c file, line 435, if (bdrv_get_dirty(bmds->bs, sector)) {
>
> It looks like this "if statement" is used to check whether a chunk is dirty or not. If it is dirty, system will migrate a whole chunk, 1MB data, to the destination. Otherwise, the cur_dirty will increase by 1MB/512B sectors.
>
> However, in my understanding, this function, bdrv_get_dirty(bmds->bs, sector), only check this sector (512B) is dirty or not, rather than a whole chunk (1MB). Could someone tell me the reason?
See block-migration.c:set_dirty_tracking():
bdrv_set_dirty_tracking(bmds->bs, enable ? BLOCK_SIZE : 0);
The dirty bitmap granularity is set to BLOCK_SIZE. Any write in the
open range [sector, sector + BLOCK_SIZE / BDRV_SECTOR_SIZE) will mark
the bit dirty.
Stefan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-10-10 8:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-03 4:23 [Qemu-devel] An issue in block-migration Yaodong Yang
2013-10-10 8:46 ` Stefan Hajnoczi
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).