++ more migration experts! On Tue, 23 Feb 2021 at 06:47, Richard Henderson <richard.hender...@linaro.org> wrote: > > On 2/22/21 1:46 AM, Haibo Xu wrote: > > As I mentioned in the cover later, the reason to let the tag go with the > > memory data together is to make it easier to sync with each other. I think > > if we migratie them separately, it would be hard to keep the tags to sync > > with the data. > Well, maybe, maybe not. See below. > > > > Saying if we migration all the data first, then the tags. If the data got > > dirty during the migration of the tag memory, we may need to send the data > > again, or freeze the source VM after data migration? What's more, the > > KVM_GET_DIRTY_LOG API may not be able to differentiate between a tag and > > data changes. > I would certainly expect KVM_GET_DIRTY_LOG to only care about the normal > memory. That is, pages as viewed by the guest. > > I would expect the separate tag_memory block to be private to the host. If a > normal page is dirty, then we would read the tags into the tag_memory and > manually mark that dirty. Migration would continue as normal, and eventually > both normal and tag memory would all be clean and migrated. > > But I'll admit that it does require that we retain a buffer 1/16 the size of > main memory, which is otherwise unused, and thus this is less than ideal. So > if we do it your way, we should arrange for tcg to migrate the tag data in the > same way. > > I'll still wait for migration experts, of which I am not one. > > > r~