Re: [PATCH v3 00/21] KVM: Dirty ring interface

From: Michael S. Tsirkin
Date: Thu Jan 09 2020 - 11:40:37 EST


On Thu, Jan 09, 2020 at 11:17:42AM -0500, Peter Xu wrote:
> On Thu, Jan 09, 2020 at 10:59:50AM -0500, Michael S. Tsirkin wrote:
> > On Thu, Jan 09, 2020 at 09:57:08AM -0500, Peter Xu wrote:
> > > Branch is here: https://github.com/xzpeter/linux/tree/kvm-dirty-ring
> > > (based on kvm/queue)
> > >
> > > Please refer to either the previous cover letters, or documentation
> > > update in patch 12 for the big picture.
> >
> > I would rather you pasted it here. There's no way to respond otherwise.
>
> Sure, will do in the next post.
>
> >
> > For something that's presumably an optimization, isn't there
> > some kind of testing that can be done to show the benefits?
> > What kind of gain was observed?
>
> Since the interface seems to settle soon, maybe it's time to work on
> the QEMU part so I can give some number. It would be interesting to
> know the curves between dirty logging and dirty ring even for some
> small vms that have some workloads inside.
>
> >
> > I know it's mostly relevant for huge VMs, but OTOH these
> > probably use huge pages.
>
> Yes huge VMs could benefit more, especially if the dirty rate is not
> that high, I believe. Though, could you elaborate on why huge pages
> are special here?
>
> Thanks,

With hugetlbfs there are less bits to test: e.g. with 2M pages a single
bit set marks 512 pages as dirty. We do not take advantage of this
but it looks like a rather obvious optimization.

> --
> Peter Xu