+2
−1
+9
−1
Loading
Merge Pull Request from: @wenzhiwei11
The new dirty ring interface is another way to collect dirty pages for
the virtual machines. It is different from the existing dirty logging
interface in a few ways, majorly:
- Data format: The dirty data was in a ring format rather than a
bitmap format, so dirty bits to sync for dirty logging does not
depend on the size of guest memory any more, but speed of
dirtying. Also, the dirty ring is per-vcpu, while the dirty
bitmap is per-vm.
- Data copy: The sync of dirty pages does not need data copy any more,
but instead the ring is shared between the userspace and kernel by
page sharings (mmap() on vcpu fd)
- Interface: Instead of using the old KVM_GET_DIRTY_LOG,
KVM_CLEAR_DIRTY_LOG interfaces, the new ring uses the new
KVM_RESET_DIRTY_RINGS ioctl when we want to reset the collected
dirty pages to protected mode again (works like
KVM_CLEAR_DIRTY_LOG, but ring based). To collecting dirty bits,
we only need to read the ring data, no ioctl is needed.
Link:https://gitee.com/openeuler/kernel/pulls/5545
Reviewed-by:
Kevin Zhu <zhukeqian1@huawei.com>
Signed-off-by:
Jialin Zhang <zhangjialin11@huawei.com>