Re: [PATCH 05/20] KVM: selftests: Precisely track number of dirty/clear pages for each iteration

Sean Christopherson
2024-12-18T21:37:50Z

On Tue, Dec 17, 2024, Maxim Levitsky wrote:
> On Fri, 2024-12-13 at 17:07 -0800, Sean Christopherson wrote:
> > Track and print the number of dirty and clear pages for each iteration.
> > This provides parity between all log modes, and will allow collecting the
> > dirty ring multiple times per iteration without spamming the console.
> >
> > Opportunistically drop the "Dirtied N pages" print, which is redundant
> > and wrong. For the dirty ring testcase, the vCPU isn't guaranteed to
> > complete a loop. And when the vCPU does complete a loot, there are no
> Typo
> > guarantees that it has *dirtied* that many pages; because the writes are
> > to random address, the vCPU may have written the same page over and over,
> > i.e. only dirtied one page.
>
> Counting how many times a vCPU wrote is also a valid statistic
>
> I think it would be the best to include it as well (e.g call it number of
> loops that vCPU did).

Heh, I originally had it that way, but dropped it because it didn't seem all that
interesting. I'll add it back.