]> git.ipfire.org Git - thirdparty/qemu.git/commit
COLO: Flush memory data from ram cache
authorZhang Chen <zhangckid@gmail.com>
Mon, 3 Sep 2018 04:38:50 +0000 (12:38 +0800)
committerJason Wang <jasowang@redhat.com>
Fri, 19 Oct 2018 03:15:03 +0000 (11:15 +0800)
commite6f4aa188cf1849b2a4949e62fb04ea44ca0d083
tree13fc2867a345f8617cecebabc5cb6008a32de2b7
parent7d9acafa2cc094d03f46abc522786a1696983639
COLO: Flush memory data from ram cache

During the time of VM's running, PVM may dirty some pages, we will transfer
PVM's dirty pages to SVM and store them into SVM's RAM cache at next checkpoint
time. So, the content of SVM's RAM cache will always be same with PVM's memory
after checkpoint.

Instead of flushing all content of PVM's RAM cache into SVM's MEMORY,
we do this in a more efficient way:
Only flush any page that dirtied by PVM since last checkpoint.
In this way, we can ensure SVM's memory same with PVM's.

Besides, we must ensure flush RAM cache before load device state.

Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
migration/ram.c
migration/trace-events