Re: [PATCH RESEND v2 15/17] KVM: selftests: Add dirty ring buffer test

From: Jason Wang
Date: Tue Dec 24 2019 - 01:51:15 EST



On 2019/12/21 äå10:04, Peter Xu wrote:
Add the initial dirty ring buffer test.

The current test implements the userspace dirty ring collection, by
only reaping the dirty ring when the ring is full.

So it's still running asynchronously like this:


I guess you meant "synchronously" here.

Thanks



vcpu main thread

1. vcpu dirties pages
2. vcpu gets dirty ring full
(userspace exit)

3. main thread waits until full
(so hardware buffers flushed)
4. main thread collects
5. main thread continues vcpu

6. vcpu continues, goes back to 1