Please consider overtake the previous v2 [1] of this patch which is a single patch, also please find more information in the commit message of each patch. I kept the versioning since it solves the same problem, but mostly rewritten. I've run a few hours of below workloads in parallel to test this patch: (1) while :; do taskset -c 1 ./dirty_log_test; done (2) taskset -c 1 bash -c "while :; do :; done" Review comments are greatly welcomed. Thanks, [1] https://lore.kernel.org/lkml/20210413213641.23742-1-peterx@xxxxxxxxxx/ Peter Xu (2): KVM: selftests: Sync data verify of dirty logging with guest sync KVM: selftests: Wait for vcpu thread before signal setup tools/testing/selftests/kvm/dirty_log_test.c | 68 +++++++++++++++++--- 1 file changed, 58 insertions(+), 10 deletions(-) -- 2.26.2