On Wed, Mar 23, 2016 at 06:48:22AM +0000, Li, Liang Z wrote: [...] >> > 8. Pseudo code >> > Dirty page logging should be enabled before getting the free page >> > information from guest, this is important because during the process >> > of getting free pages, some free pages may be used and written by the >> > guest, dirty page logging can trace these pages. The pseudo code is >> > like below: >> > >> > ----------------------------------------------- >> > MigrationState *s = migrate_get_current(); >> > ... >> > >> > memory_global_dirty_log_start(); >> > >> > if (get_guest_mem_info(&info)) { >> > while (!get_free_page_bmap(free_page_bitmap, drop_page_cache) >> && >> > s->state != MIGRATION_STATUS_CANCELLING) { >> > usleep(1000) // sleep for 1 ms >> > } >> > >> > tighten_free_page_bmap = >> tighten_guest_free_pages(free_page_bitmap); >> > filter_out_guest_free_pages(tighten_free_page_bmap); >> > } >> >> Given the typical speed of networks; it wouldn't do too much harm to start >> sending assuming all pages are dirty and then when the guest finally gets >> around to finishing the bitmap then update, so it's asynchronous - and then if >> the guest never responds we don't really care. > >Indeed, thanks! > This is interesting. By doing so, the threshold I mentioned in another mail is not necessary, since we can do it in parallel. >Liang >> >> Dave >> >> > >> > migration_bitmap_sync(); >> > ... >> > >> > ----------------------------------------------- >> > >> > >> > -- >> > 1.9.1 >> > >> -- >> Dr. David Alan Gilbert / dgilbert@xxxxxxxxxx / Manchester, UK >N�����r��y���b�X��ǧv�^�){.n�+����h����ܨ}���Ơz�&j:+v�������zZ+��+zf���h���~����i���z��w���?����&�)ߢf -- Richard Yang\nHelp you, Help me -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html