Re: [PATCH] KVM: stats: Add VM dirty_pages stats for the number of dirty pages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 10, 2021 at 4:15 PM Peter Feiner <pfeiner@xxxxxxxxxx> wrote:
> > Races to increment by a few pages might be OK, so long as imprecision
> > is acceptable, but decrementing by an entire bitmap could cause the
> > stat to get waaay off from the state of the VM.
>
> My original use case was to know the rate at which memory was being
> dirtied to predict how expensive a live migration would be. I didn't
> need full precision, but I would have needed a bound on the slop. A
> "few pages" isn't a bound :-)

I think the agreement with VM-scoped statistics is that slop is OK,
better than paying the cost of locking/atomics. If we want to be
exact, it'd have to be a vCPU stat.

> IMO, this patch isn't worth figuring out without a use case. It's
> complex and has perf overhead. Maybe just drop it?

Knowing the approximate rate at which pages are being dirtied would be
a nice-to-have for debugging, IMO. Just treating this stat as
monotonic would greatly simplify it and avoid the overhead.

--
Thanks,
Oliver



[Index of Archives]     [KVM Development]     [KVM ARM]     [KVM ia64]     [Linux Virtualization]     [Linux USB Devel]     [Linux Video]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux