[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191210164908-mutt-send-email-mst@kernel.org>
Date: Tue, 10 Dec 2019 16:53:17 -0500
From: "Michael S. Tsirkin" <mst@...hat.com>
To: Peter Xu <peterx@...hat.com>
Cc: Paolo Bonzini <pbonzini@...hat.com>,
Jason Wang <jasowang@...hat.com>, linux-kernel@...r.kernel.org,
kvm@...r.kernel.org,
Sean Christopherson <sean.j.christopherson@...el.com>,
"Dr . David Alan Gilbert" <dgilbert@...hat.com>,
Vitaly Kuznetsov <vkuznets@...hat.com>
Subject: Re: [PATCH RFC 04/15] KVM: Implement ring-based dirty memory tracking
On Tue, Dec 10, 2019 at 11:02:11AM -0500, Peter Xu wrote:
> On Tue, Dec 10, 2019 at 02:31:54PM +0100, Paolo Bonzini wrote:
> > On 10/12/19 14:25, Michael S. Tsirkin wrote:
> > >> There is no new infrastructure to track the dirty pages---it's just a
> > >> different way to pass them to userspace.
> > > Did you guys consider using one of the virtio ring formats?
> > > Maybe reusing vhost code?
> >
> > There are no used/available entries here, it's unidirectional
> > (kernel->user).
>
> Agreed. Vring could be an overkill IMHO (the whole dirty_ring.c is
> 100+ LOC only).
I guess you don't do polling/ event suppression and other tricks that
virtio came up with for speed then? Why won't they be helpful for kvm?
To put it another way, LOC is irrelevant, virtio is already in the
kernel.
Anyway, this is something to be discussed in the cover letter.
> >
> > > If you did and it's not a good fit, this is something good to mention
> > > in the commit log.
> > >
> > > I also wonder about performance numbers - any data here?
> >
> > Yes some numbers would be useful. Note however that the improvement is
> > asymptotical, O(#dirtied pages) vs O(#total pages) so it may differ
> > depending on the workload.
>
> Yes. I plan to give some numbers when start to work on the QEMU
> series (after this lands). However as Paolo said, those numbers would
> probably only be with some special case where I know the dirty ring
> could win. Frankly speaking I don't even know whether we should
> change the default logging mode when the QEMU work is done - I feel
> like the old logging interface is still good in many major cases
> (small vms, or high dirty rates). It could be that we just offer
> another option when the user could consider to solve specific problems.
>
> Thanks,
>
> --
> Peter Xu
Powered by blists - more mailing lists